Skip to content

Add an obvious notice for metric initialization of multiprocess collector - #153

Closed
justdoit0823 wants to merge 1 commit into
prometheus:masterfrom
justdoit0823:master
Closed

Add an obvious notice for metric initialization of multiprocess collector#153
justdoit0823 wants to merge 1 commit into
prometheus:masterfrom
justdoit0823:master

Conversation

@justdoit0823

Copy link
Copy Markdown

As a beginner, I build a histogram metric in my Python application with a self-defined collect registry.When deploy under multiple process circumstance, I get a help from README file. According to that, I don't change metric's initialzation and get http 500 when making requests to pushgateway. Finally, I fix the problem and think there should be a more clear and obvious description for beginners.

@brian-brazil

Copy link
Copy Markdown
Contributor

The example already indicates how to do it correctly. I don't think it's sane to list every way in why someone managed to not follow the example correctly.

@justdoit0823

Copy link
Copy Markdown
Author

while there is no any more explaination about CollectorRegistry class, collector will fail when using multiprocess collector's registry as metric registry argument. It just like a balck box.

@brian-brazil

Copy link
Copy Markdown
Contributor

This is all deep magic. Attempting to explain it would only cause more user confusion.

@justdoit0823

Copy link
Copy Markdown
Author

With more detailed document about how CollectorRegitry works with metric, beginners can easily make sense of the structure of metric observation and metric collector.

@brian-brazil

Copy link
Copy Markdown
Contributor

Users shouldn't have to care. The docs provide full examples on how to use this correctly, and anyone looking for more can read the code or ask for help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants