Skip to content

Commit 0503814

Browse files
committed
Add check that we really want runtime only
1 parent 71ea5ba commit 0503814

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

instana/runtime.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66

77
def hook(module):
88
""" Hook method to install the Instana middleware into Flask """
9-
if "INSTANA_DEV" in os.environ:
10-
level = logging.DEBUG
11-
else:
12-
level = logging.WARN
13-
opts = options.Options(log_level=level)
14-
ot.global_tracer = tracer.InstanaTracer(opts)
9+
if os.environ["AUTOWRAPT_BOOTSTRAP"] == "runtime":
10+
if "INSTANA_DEV" in os.environ:
11+
level = logging.DEBUG
12+
else:
13+
level = logging.WARN
14+
opts = options.Options(log_level=level)
15+
ot.global_tracer = tracer.InstanaTracer(opts)

0 commit comments

Comments
 (0)