-
Notifications
You must be signed in to change notification settings - Fork 160
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
Feature: Prometheus Middleware to collect metrics #1665
Comments
I would be happy to implement this feature. |
and what is the best type for metrics? counter or histogram? |
I think, it should be counter type |
I'd be cool if there was also an option for publishing the metrics to a Prometheus Pushgateway. This would benefit short-lived and ephemeral jobs. It's already supported by the Prometheus Python client. https://prometheus.github.io/client_python/exporting/pushgateway/ |
The main idea, that you should pass |
@Lancetnik Yeah, that would work 💪 |
I conducted a small research and am adding information about the planned metrics:metrics that I plan to implement:
each metric will have labels: message processing metrics will also have a status values for processing received messages:
status values for processing sent messages:
the error number metric will have a label |
To improve Observability in FastStream, Prometheus Middleware support is needed.
Suggested metrics:
I'm guessing the usage would look something like this:
Solution pseudocode:
This example produces metrics like this:
It’s also a good idea to add a “handler” label in metrics, but I haven’t yet been able to figure out how to get meta information about the handler. Or how can I do this better by getting it from a msg object?
I would be glad to hear any comments and suggestions on this implementation.
The text was updated successfully, but these errors were encountered: