-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Add Production Metrics in Prometheus format #1890
Conversation
Add /metrics for openai endpoint with the metrics that were already logged.
That looks great! Sorry for the delay |
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.
Looks good to me!
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.
@simon-mo Thanks for the awesome work! Left some minor comments.
@WoosukKwon updated! |
@simon-mo A dumb question: Can you provide an example script that I can test the PR? |
|
I see. I was testing |
It's probably not something you want to expose to users, nor is it a part of OpenAI API spec. It's better to leave it at |
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.
@simon-mo WDYT?
|
|
Hi @simon-mo , it seems like not working properly when
|
Thank you for the PR! I noticed that Here are a few considerations:
I'm curious to understand the rationale behind choosing |
@ichernev @simon-mo @WoosukKwon @Yard1 Could you please share your thoughts on this matter? |
I don't have particular preference. It seems aioprometheus has both good integration and an all in one lightweight package. |
This one builds on #1662. It adds
aioprometheus
as a dependency which is very lightweight. It exposes the metrics as we perform the regular logging pass in engine step. The memory usage is very small and constant (there is no history, only current state). The metrics is designed to be scraped and stored by external service.We currently just add metrics in engine step. Follow up: #1870
Here's an example of the metrics endpoint output.