We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd8ebdd commit 2c93115Copy full SHA for 2c93115
instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/utils.py
@@ -146,14 +146,13 @@ def set_attributes_from_context(
146
value = "topic"
147
break
148
149
- # set attribute name if not set specially for a key
150
- if attribute_name is None and not new_attribute_name:
151
- attribute_name = f"celery.{key}"
152
-
153
if attribute_name:
154
span.set_attribute(attribute_name, value)
155
if new_attribute_name:
156
span.set_attribute(new_attribute_name, value)
+ # set attribute name if not set specially for a key
+ if attribute_name is None and new_attribute_name is None:
+ span.set_attribute(f"celery.{key}", value)
157
158
159
def attach_context(
0 commit comments