Skip to content

Commit feff372

Browse files
authored
Add support for INSTANA_DEBUG env var; remove INSTANA_DEV (#154)
1 parent 3ca663e commit feff372

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

Configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ config['asyncio_task_context_propagation']['enabled'] = True
4343

4444
## Debugging & More Verbosity
4545

46-
Setting `INSTANA_DEV` to a non nil value will enable extra logging output generally useful
46+
Setting `INSTANA_DEBUG` to a non nil value will enable extra logging output generally useful
4747
for development.
4848

4949
```Python
50-
export INSTANA_DEV="true"
50+
export INSTANA_DEBUG="true"
5151
```
5252

5353
## Disabling Automatic instrumentation

example/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ WORKDIR /usr/src/app
55
COPY . ./
66
RUN pip install --no-cache-dir -r requirements.txt
77
ENV PYTHONPATH /usr/src/app
8-
ENV INSTANA_DEV true
8+
ENV INSTANA_DEBUG true
99

1010
CMD [ "python", "./example/simple.py" ]

instana/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def load(_):
4646
Method used to activate the Instana sensor via AUTOWRAPT_BOOTSTRAP
4747
environment variable.
4848
"""
49-
if "INSTANA_DEV" in os.environ:
49+
if "INSTANA_DEBUG" in os.environ:
5050
print("==========================================================")
5151
print("Instana: Loading...")
5252
print("==========================================================")

instana/flaskana.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def wrapper(wrapped, instance, args, kwargs):
1515

1616
def hook(module):
1717
""" Hook method to install the Instana middleware into Flask """
18-
if "INSTANA_DEV" in os.environ:
18+
if "INSTANA_DEBUG" in os.environ:
1919
print("==============================================================")
2020
print("Instana: Running flask hook")
2121
print("==============================================================")

instana/log.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def init(level):
99
f = log.Formatter('%(asctime)s: %(process)d %(levelname)s %(name)s: %(message)s')
1010
ch.setFormatter(f)
1111
logger.addHandler(ch)
12-
if "INSTANA_DEV" in os.environ:
12+
if "INSTANA_DEBUG" in os.environ:
1313
logger.setLevel(log.DEBUG)
1414
else:
1515
logger.setLevel(level)

instana/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def __init__(self, **kwds):
1313
""" Initialize Options
1414
Respect any environment variables that may be set.
1515
"""
16-
if "INSTANA_DEV" in os.environ:
16+
if "INSTANA_DEBUG" in os.environ:
1717
self.log_level = logging.DEBUG
1818

1919
if "INSTANA_SERVICE_NAME" in os.environ:

instana/tracer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def __add_stack(self, span, limit=None):
129129
break
130130

131131
# Exclude Instana frames unless we're in dev mode
132-
if "INSTANA_DEV" not in os.environ:
132+
if "INSTANA_DEBUG" not in os.environ:
133133
if re_tracer_frame.search(frame[0]) is not None:
134134
continue
135135

0 commit comments

Comments
 (0)