File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -54,13 +54,13 @@ def load(module):
5454# User configurable EUM API key for instana.helpers.eum_snippet()
5555eum_api_key = ''
5656
57- import instana .singletons #noqa
5857
58+ def boot_agent ():
59+ import instana .singletons # noqa
5960
60- def load_instrumentation ():
6161 if "INSTANA_DISABLE_AUTO_INSTR" not in os .environ :
6262 # Import & initialize instrumentation
63- if sys .version_info >= (3 , 4 ) and sys .version_info < (3 , 7 ):
63+ if ( sys .version_info >= (3 , 4 )) and ( sys .version_info < (3 , 7 ) ):
6464 from .instrumentation import asynqp # noqa
6565 from .instrumentation import mysqlpython # noqa
6666 from .instrumentation import redis # noqa
@@ -71,9 +71,8 @@ def load_instrumentation():
7171
7272
7373if "INSTANA_MAGIC" in os .environ :
74- # If we're being loaded into an already running process, then delay
75- # instrumentation load.
76- t = Timer (2.0 , load_instrumentation )
74+ # If we're being loaded into an already running process, then delay agent initialization
75+ t = Timer (3.0 , boot_agent )
7776 t .start ()
7877else :
79- load_instrumentation ()
78+ boot_agent ()
Original file line number Diff line number Diff line change 2222 from opentracing .scope_managers .asyncio import AsyncioScopeManager
2323 async_tracer = InstanaTracer (AsyncioScopeManager ())
2424
25- # Set ourselves as the tracer.
25+ # Set ourselves as the tracer.
2626opentracing .tracer = tracer
You can’t perform that action at this time.
0 commit comments