You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Metric help text is ignored in multiprocess mode #211
The bug report is for 0.0.22. Now tried with the latest 0.1.1 and python
3.4.6 on Ubuntu Linux 16.04 and it's still the same issue:
```
# HELP gunicron_workers Multiprocess metric
# TYPE gunicron_workers gauge
gunicron_workers 0.0
```
@brian-brazil Is there a reason why multiprocess mode does not preserve the help text? It seems like it could be passed along and serialized alongside the metric name and labels and then used when instantiating the Metric() again by the MultiProcessCollector.
I don't know of any blocking reason this could not be implemented, if someone wants to submit a pull request I would be happy to review it. There might be some edge cases in the implementation such as what to do if the help text across the multiple processes does not match for some reason.
@csmarchbanks Great, thanks! I expect I'll make a PR sometime in the next few weeks unless someone beats me to it (but given this issue was opened over 3 years ago, it seems unlikely! 🙃)
In the case of conflicting help text, two options I see are arbitrarily keeping one of them or falling back to the existing placeholder text. The first seems more helpful to me since it'll still be more specific than the placeholder, but I'd be curious to hear your thoughts.
Arbitrarily keeping one, but then only using that one for future scrapes would be ok with me (basically first one wins). It is an edge case that most users hopefully will not run into, but avoiding metadata churn in the Prometheus server would be nice. I don't know if there will be other similar edge cases or not, but I am sure you will find out when you start working on it :).
Any update on this? Since the metric directory is supposed to be wiped on every gunicorn restart, I am ok with reusing any previously set placeholder text, in case of conflicts.
Hi guys, is it okay that the change is not backwards-compatible? There is an exception raised now in version 1.16.0 in case the registry tries to collect data from database files that existed before:
Activity
rszalski commentedon Feb 12, 2018
What version are you on @haizaar ? I'm using
multiprocessmode on version ==0.1.1 and all the help messages look ok.OS: macOS 10.13.3
Python: 3.6.4 (through
pipenv)haizaar commentedon Feb 12, 2018
rszalski commentedon Feb 13, 2018
Paste the code you use to define and generate those metrics, maybe we can figure something out or reproduce this.
brian-brazil commentedon Feb 13, 2018
This is the way it works currently, multiprocess mode does not preserve the help text.
rszalski commentedon Feb 13, 2018
Gotta check my config then, might have botched something when enabling multiprocess mode 😕
HannesMvW commentedon Aug 27, 2018
Is this perhaps in the pipe, to preserve help texts in multiprocess mode?
tsibley commentedon Mar 19, 2021
@brian-brazil Is there a reason why multiprocess mode does not preserve the help text? It seems like it could be passed along and serialized alongside the metric name and labels and then used when instantiating the
Metric()again by theMultiProcessCollector.csmarchbanks commentedon Mar 22, 2021
I don't know of any blocking reason this could not be implemented, if someone wants to submit a pull request I would be happy to review it. There might be some edge cases in the implementation such as what to do if the help text across the multiple processes does not match for some reason.
tsibley commentedon Mar 24, 2021
@csmarchbanks Great, thanks! I expect I'll make a PR sometime in the next few weeks unless someone beats me to it (but given this issue was opened over 3 years ago, it seems unlikely! 🙃)
In the case of conflicting help text, two options I see are arbitrarily keeping one of them or falling back to the existing placeholder text. The first seems more helpful to me since it'll still be more specific than the placeholder, but I'd be curious to hear your thoughts.
csmarchbanks commentedon Mar 30, 2021
Arbitrarily keeping one, but then only using that one for future scrapes would be ok with me (basically first one wins). It is an edge case that most users hopefully will not run into, but avoiding metadata churn in the Prometheus server would be nice. I don't know if there will be other similar edge cases or not, but I am sure you will find out when you start working on it :).
sandipb commentedon Feb 22, 2022
Any update on this? Since the metric directory is supposed to be wiped on every gunicorn restart, I am ok with reusing any previously set placeholder text, in case of conflicts.
harpener commentedon Feb 3, 2023
Hi guys, is it okay that the change is not backwards-compatible? There is an exception raised now in version 1.16.0 in case the registry tries to collect data from database files that existed before:
csmarchbanks commentedon Feb 3, 2023
I probably should have put a note in release about that, but it is expected and from the docs:
So old versions should not be processed by the new code (and vice versa).
Also, closing the issue as it has been implemented!