You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 31, 2022. It is now read-only.
However, that doesn't prevent a user from creating multiple instances of Telemetry for the same registry and attempting to register an object which is already registered:
Caused by: java.lang.IllegalArgumentException: Collector already registered that provides name: test
at io.prometheus.client.CollectorRegistry.register(CollectorRegistry.java:54)
at io.prometheus.client.SimpleCollector$Builder.register(SimpleCollector.java:245)
at com.samstarling.prometheusfinagle.metrics.Telemetry.$anonfun$counter$1(Telemetry.scala:28)
at scala.collection.concurrent.TrieMap.getOrElseUpdate(TrieMap.scala:903)
at com.samstarling.prometheusfinagle.metrics.Telemetry.counter(Telemetry.scala:28)
The caching should take the registry into account, not only the object name and namespace. It seems currently not possible to get a previously registered collection from CollectorRegistry (no method available and namesToCollectors is unfortunately not exposed)