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 d412bd7 commit fb11756Copy full SHA for fb11756
src/instana/instrumentation/kafka/kafka_python.py
@@ -51,6 +51,9 @@ def trace_kafka_send(
51
52
# context propagation
53
headers = kwargs.get("headers", [])
54
+ if not is_suppressed and ("x_instana_l_s", b"0") in headers:
55
+ is_suppressed = True
56
+
57
suppression_header = {"x_instana_l_s": "0" if is_suppressed else "1"}
58
headers.append(suppression_header)
59
@@ -96,10 +99,8 @@ def create_span(
96
99
)
97
100
98
101
if not is_suppressed and headers:
- for header_name, header_value in headers:
- if header_name == "x_instana_l_s" and header_value == b"0":
- is_suppressed = True
102
- break
+ if ("x_instana_l_s", b"0") in headers:
103
104
105
if is_suppressed:
106
return
0 commit comments