File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,11 @@ def add(x, y):
77
77
from opentelemetry .semconv .trace import SpanAttributes
78
78
from opentelemetry .trace .status import Status , StatusCode
79
79
80
- ExceptionWithTraceback = utils .import_exception_with_traceback ()
80
+
81
+ if VERSION >= (4 , 0 , 1 ):
82
+ from billiard .einfo import ExceptionWithTraceback
83
+ else :
84
+ ExceptionWithTraceback = None
81
85
82
86
logger = logging .getLogger (__name__ )
83
87
Original file line number Diff line number Diff line change 48
48
)
49
49
50
50
51
- def import_exception_with_traceback ():
52
- if VERSION >= (4 , 0 , 1 ):
53
- from billiard .einfo import ExceptionWithTraceback
54
-
55
- return ExceptionWithTraceback
56
-
57
- return None
58
-
59
-
60
51
# pylint:disable=too-many-branches
61
52
def set_attributes_from_context (span , context ):
62
53
"""Helper to extract meta values from a Celery Context"""
You can’t perform that action at this time.
0 commit comments