-
Notifications
You must be signed in to change notification settings - Fork 139
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
Allow exporting JetStream metadata as prometheus labels #317
Comments
I took the liberty of providing an example implementation. |
One might discuss whether stream and consumer labels should coalesce or not. That is, if both stream and consumer have a metadata value for "product", should the resulting Prometheus metrics have two labels for this (e.g. |
Another discussion point: The exported values should be explicitly defined so as to avoid exporting all metadata as labels and accidentally creating high metric cardinality. |
Agree with either specifically defined or prefix based metadata selection, We're adding a bunch of metadata and I have a monitoring solution - that I am considering adding to the exporters - that does health checks on a per resource based based on metadata and it would become a lot
|
The linked PR currently allows defining stream and consumer metadata fields which are separately exported as metrics. |
What motivated this proposal?
We would like to route NATS-related alerts to responsible teams, but would not want teams to have to configure alert routing (complex and error prone). Instead, we'd like to enable them to add suitable metadata to JetStream streams/consumers (i.e. "team", "domain", "product", …) and have generic routing rules based on those.
What is the proposed change?
Provide configuration options to allow exporting select metadata values as Prometheus labels.
Who benefits from this change?
Anyone who'd like to group Prometheus metrics by some metadata like product/domain/etc. This is common based on e.g. k8s labels.
What alternatives have you evaluated?
The text was updated successfully, but these errors were encountered: