litellm icon indicating copy to clipboard operation
litellm copied to clipboard

[Bug]: Prometheus seems broken

Open rjanovski opened this issue 9 months ago • 2 comments

What happened?

followed the instructions of adding prometheus metrics:

  litellm_settings:
    success_callback: [ "prometheus" ]
    failure_callback: [ "prometheus" ]
    service_callback: ["prometheus_system"]

and /metrics just reports 307 Temporary Redirect

Relevant log output

127.0.0.1:60754 - "GET /metrics HTTP/1.1" 307

Twitter / LinkedIn details

No response

rjanovski avatar May 06 '24 14:05 rjanovski

works for me on latest

Screenshot 2024-05-06 at 7 37 04 AM

ishaan-jaff avatar May 06 '24 14:05 ishaan-jaff

@rjanovski can you try http://localhost:4000/metrics/ ?

ishaan-jaff avatar May 06 '24 14:05 ishaan-jaff

Thanks Ishaan,

yes, that works (trailing slash) /metrics/ since prometheus can scrape that, I'm happy.

could be better to expose the metrics with both paths: /metric and /metric/

but since you are exposing exactly like the prometheus_client docs, I guess this is the correct way.

great work! thanks again :)

rjanovski avatar May 07 '24 11:05 rjanovski