python: gunicorn appids improvements
Jongy opened this issue · 0 comments
Jongy commented
This assumption is wrong -
gprofiler/gprofiler/metadata/application_identifiers.py
Lines 119 to 120 in 7d9ffb2
and I'm seeing many sites where we select a random argument to gunicorn
due to it.
Let's try improving it with heuristics:
- all app specs will have
:
in them, so don't try arguments that don't have:
. - if multiple args with
:
exist, prefer the one not preceeded by a--
or-
argument, i.e in a commandline likegunicorn -k 4 myapp:app -b 0.0.0.0:80
it will prefer the first:
occurrence because it's preceeded by arg4
not by arg-b
.
The same probably applies for #693 .