Skip to content

Commit 3cc58da

Browse files
committed
Better Django app name extraction.
1 parent 93591e3 commit 3cc58da

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

instana/meter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ def collect_snapshot(self):
150150
try:
151151
if "FLASK_APP" in os.environ:
152152
appname = os.environ["FLASK_APP"]
153+
elif "DJANGO_SETTINGS_MODULE" in os.environ:
154+
appname = os.environ["DJANGO_SETTINGS_MODULE"].split('.')[0]
153155
else:
154156
appname = os.path.basename(sys.executable)
155157

0 commit comments

Comments
 (0)