File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 1
1
import logging
2
2
3
- import opentracing
3
+ try :
4
+ import opentracing
5
+ except ModuleNotFoundError : # pragma: no cover
6
+ opentracing = None
7
+ try :
8
+ from jaeger_client .metrics .prometheus import PrometheusMetricsFactory
9
+ except ModuleNotFoundError : # pragma: no cover
10
+ PrometheusMetricsFactory = None
11
+ try :
12
+ from opentracing_instrumentation import get_current_span
13
+ except ModuleNotFoundError : # pragma: no cover
14
+ get_current_span = None
15
+
4
16
from flask import current_app , request , has_request_context
5
- from jaeger_client .metrics .prometheus import PrometheusMetricsFactory
6
- from opentracing_instrumentation import get_current_span
7
17
8
18
from pyms .config .conf import get_conf
9
19
from pyms .constants import LOGGER_NAME
You can’t perform that action at this time.
0 commit comments