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 edc88e7 commit 1e9bf78Copy full SHA for 1e9bf78
instana/instrumentation/urllib3.py
@@ -7,8 +7,13 @@
7
8
@wrapt.patch_function_wrapper('urllib3', 'PoolManager.urlopen')
9
def urlopen_with_instana(wrapped, instance, args, kwargs):
10
+ context = instana.internal_tracer.current_context()
11
+
12
+ # If we're not tracing, just return
13
+ if context is None:
14
+ return wrapped(*args, **kwargs)
15
16
try:
- context = instana.internal_tracer.current_context()
17
span = instana.internal_tracer.start_span("urllib3", child_of=context)
18
span.set_tag(ext.HTTP_URL, args[1])
19
span.set_tag(ext.HTTP_METHOD, args[0])
0 commit comments