Skip to content

Commit 01e4b6c

Browse files
committed
Add environment variable to disable automatic instrumentation
1 parent 5e6088f commit 01e4b6c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

instana/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
from __future__ import absolute_import
2+
import os
23
import opentracing
34
from .sensor import Sensor
45
from .tracer import InstanaTracer
56
from .options import Options
67

7-
# Import & initialize instrumentation
8-
from .instrumentation import urllib3
8+
if "INSTANA_DISABLE_AUTO_INSTR" not in os.environ:
9+
# Import & initialize instrumentation
10+
from .instrumentation import urllib3
911

1012
"""
1113
The Instana package has two core components: the sensor and the tracer.

0 commit comments

Comments
 (0)