-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Simple prometheus metrics #125
Comments
The |
Famous last words... I've implemented an stdout exporter, but the OTLP exporter requires tokio for transport (via tonic). Never written Rust before so not sure how to implement that safely, since the existing tokio runtime builder has error handling that relies on tracing init. Maybe init stdout tracing, then add the OTLP layer later? |
I'm not OTLP familiar. so if a On the other hand, if feature-completeness is wanted then I was even thinking why not introduce the feature under an So don't hesitate to open a PR or draft if you think, so others could jump in. |
Had another attempt at this today. Prometheus scrapes text metrics from an endpoint, so I've added Unfortunately the OTel crate didn't have default fields, and the first-party tokio-metrics is stateful so isn't suitable for Prometheus. It's also worth considering whether we want any additional metrics. Current metrics
I've added an OTLP trace exporter too. Not sure I know enough to get it merge-ready though - it's using |
@pl4nty Maybe you could even start a draft PR just to see how it would look like and exchange ideas. Just as an anecdote. I had a conversation about the Prometheus feature in SWS with one of the tracing crate maintainers time ago and he said that it could work but he was not really sure. In eventually case, I could even try to reach out the tracing crate folks on Discord to help us out. |
And about the feature, it is not specific at the moment what metrics has to be exported. So it would be also good to describe what metrics should be expected. |
I'll send a PR for metrics soon. OTLP is proving more challenging - I've fixed error formatting, but testing against a server fails when initialised from I can init in |
Experimental Tokio Runtime metrics for Prometheus is added as a first stage in #307. However, we would like to continue enhancing this feature to support server metrics like incoming requests, connected clients, response code and response duration in the near future. |
Is your feature request related to a problem? Please describe.
I'd like to observe some minimal metrics.
Describe the solution you'd like
Expose prometheus metrics
Describe alternatives you've considered
Looking for a rust library to possibly plugin into.
Additional context
Add any other context or screenshots about the feature request here if needed.
The text was updated successfully, but these errors were encountered: