-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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 metrics endpoint and request metrics #3529
base: main
Are you sure you want to change the base?
Conversation
fac8410
to
fa80199
Compare
@yuliyantsvetkov @jmorganca It would be great if you can take a look. |
This would be great |
I think if observability is going to be added it should use the latest OpenTelmetry libraries instead of prometheus_client, especially because they're now stable and there's a lot more support now. prometheus only supports metrics, also, whereas I see it would be very valuable to add traces for observability purposes. Happy to chat more about it on discord |
@joshcarp I checked the OpenTelemetry libraries and your suggestion makes sense. It would be better to use Otel libraries. I will update the PR or create new one when i get some free time. |
There's also a company called traceloop which does LLM observability who are spearheading a lot of the LLM observability stuff in Otel AFAIK. Might be worth seeing what they're doing because a lot of this seems like they're implementing/standardiing |
Hey folks, I am the maintainer for OpenLIT (OTel-native observability for LLMs) and we do have auto instrumentation for Ollama in OpenLIT. It follows the OTel semcov for GenAI that was merged by us all in the OTel community. We cover metrics and traces from the application side, GPU metrics are something that we haven't yet covered in this though yet much like the other LLM Observability libraries but something we are actively working on. It generally invloves pulling out metrics from |
fa80199
to
1b8e977
Compare
Resolves #3144
This pull request is to add /metrics endpoint and generally used metrics.
It exposes default prometheus metrics and custom metrics for request endpoints.
This PR does not try to cover all metrics to keep it simple. If this looks good. I could add few more that will be useful.
How to test:
once Ollama server is running pull a model and list(or any other Ollama actions)
example custom metrics(not all are shown since i tried only few commands):
Full output: