-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Recently we had a crash due to not the same tags originating from different plugins from https://github.com/swift-server/swift-prometheus/blob/main/Sources/Prometheus/PrometheusCollectorRegistry.swift#L314.
We may load some arbitrary number of plugins that may define their own metrics. That may break when one of the plugin doesn't know about other one or if one of the plugins added its own specific distinguishing label.
I would like to be able to define the same metric with different set of values.
Particularly, that would be great if:
- Not to crash on different labels: assert, ignore or throw exception where possible?
- Add some option for enabling behavior with different labels allowed (or allow it permanently)
Thanks in advance, there are some links from prometheus interactions discussions (TL;DR)
Some info on related java libraries case for prometheus and compatibility below.
If I understand correctly that was some recommended behavior for Prometheus but didn't find anywhere those constraints and even their own metrics do not follow those recommendations.
Furthermore, their page advises that empty labels is the same as no labels at all.
There were some experiments around java micrometer library and some discussions around prometheus client_java library. Though, non of the discussions finished with any concrete conclusion, that is being massively workarounded al the related issues in various java libraries due to the lack for the fix.