From 773e12960b4e28dfcd5a166d15188b3550cbb0f3 Mon Sep 17 00:00:00 2001 From: Varsha GS Date: Mon, 20 Jan 2025 20:45:13 +0530 Subject: [PATCH] fix: capture headers Signed-off-by: Varsha GS --- src/instana/util/traceutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/instana/util/traceutils.py b/src/instana/util/traceutils.py index a9f1849b..ad944163 100644 --- a/src/instana/util/traceutils.py +++ b/src/instana/util/traceutils.py @@ -12,7 +12,7 @@ from instana.span.span import InstanaSpan def extract_custom_headers(span: "InstanaSpan", headers: Optional[Union[Dict[str, Any], List[Tuple[object, ...]], Iterable]] = None, format: Optional[bool] = False) -> None: - if not headers: + if not (agent.options.extra_http_headers and headers): return try: for custom_header in agent.options.extra_http_headers: