Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions instana/meter.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,13 @@ def get_application_name(self):

basename = os.path.basename(sys.argv[0])
if basename == "gunicorn":
# gunicorn renames their processes to pretty things - we use those by default
# gunicorn: master [djface.wsgi]
# gunicorn: worker [djface.wsgi]
app_name = get_proc_cmdline(as_string=True)

if app_name is None:
if 'setproctitle' in sys.modules:
# With the setproctitle package, gunicorn renames their processes
# to pretty things - we use those by default
# gunicorn: master [djface.wsgi]
# gunicorn: worker [djface.wsgi]
app_name = get_proc_cmdline(as_string=True)
else:
app_name = basename
elif "FLASK_APP" in os.environ:
app_name = os.environ["FLASK_APP"]
Expand Down