Skip to content

Commit

Permalink
Debug RequestsInstrumentor span_attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
tammy-baylis-swi committed May 8, 2024
1 parent 3a328eb commit 2f8a5ff
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ def get_or_create_headers():
except ValueError:
pass

print("!!! RequestsInstrumentor start_as_current_span with span_attributes:")
print("%s", span_attributes)

with tracer.start_as_current_span(
span_name, kind=SpanKind.CLIENT, attributes=span_attributes
) as span, set_ip_on_next_http_connection(span):
Expand Down Expand Up @@ -312,6 +315,8 @@ def get_or_create_headers():
if exception is not None:
raise exception.with_traceback(exception.__traceback__)

print("Attributes updated: %s", span_attributes)

return result

instrumented_send.opentelemetry_instrumentation_requests_applied = True
Expand Down

0 comments on commit 2f8a5ff

Please sign in to comment.