-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Metric] Fix prometheus metric backend #3124
Conversation
Nice work, could you please add the description about how to start prometheus backend to the doc as well? Thanks in advance. |
OK. |
global _metric_backend | ||
_metric_backend = "console" | ||
global _init | ||
_init = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shutdown_metrics
only set the global var _init
to False
, how does it shutdown the http server started by the prometheus metrics backend?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for you reminder. We should do some some cleanup. But there is no stop
or shutdown
in prometheus_client
.
b7e081b
to
3bf4501
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
(cherry picked from commit ff0e925)
Co-authored-by: bermaker <[email protected]>
What do these changes do?
Related issue number
Fixes #3123
We can use Prometheus metric backend as follows:
Prepare Env
How to use
http://localhost:9090
Check code requirements