Skip to content
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

LongTaskTimer: Failed to register Collector of type MicrometerCollector: The Collector exposes the same name multiple times #2765

Closed
shakuzen opened this issue Aug 30, 2021 · 1 comment
Labels
bug A general bug registry: prometheus A Prometheus Registry related issue
Milestone

Comments

@shakuzen
Copy link
Member

shakuzen commented Aug 30, 2021

Newly released 0.12.0 is causing test failures.
https://app.circleci.com/pipelines/github/micrometer-metrics/micrometer/1801/workflows/c5177df1-1c6e-4146-a5f6-e4871c49f6bd

java.lang.IllegalArgumentException: Failed to register Collector of type MicrometerCollector: The Collector exposes the same name multiple times: my_timer_seconds
	at io.prometheus.client.CollectorRegistry.assertNoDuplicateNames(CollectorRegistry.java:71)
	at io.prometheus.client.CollectorRegistry.register(CollectorRegistry.java:51)
	at io.prometheus.client.Collector.register(Collector.java:308)
	at io.micrometer.prometheus.PrometheusMeterRegistry.lambda$applyToCollector$16(PrometheusMeterRegistry.java:479)
	at java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
	at io.micrometer.prometheus.PrometheusMeterRegistry.applyToCollector(PrometheusMeterRegistry.java:475)
	at io.micrometer.prometheus.PrometheusMeterRegistry.newLongTaskTimer(PrometheusMeterRegistry.java:288)
	at io.micrometer.core.instrument.MeterRegistry$More.lambda$longTaskTimer$0(MeterRegistry.java:884)
	at io.micrometer.core.instrument.MeterRegistry.getOrCreateMeter(MeterRegistry.java:620)
	at io.micrometer.core.instrument.MeterRegistry.registerMeterIfNecessary(MeterRegistry.java:569)
	at io.micrometer.core.instrument.MeterRegistry.access$600(MeterRegistry.java:78)
	at io.micrometer.core.instrument.MeterRegistry$More.longTaskTimer(MeterRegistry.java:882)
	at io.micrometer.core.instrument.LongTaskTimer$Builder.register(LongTaskTimer.java:408)
	at io.micrometer.core.instrument.MeterRegistry$More.longTaskTimer(MeterRegistry.java:872)
	at io.micrometer.core.instrument.MeterRegistry$More.longTaskTimer(MeterRegistry.java:861)
@shakuzen shakuzen added the registry: prometheus A Prometheus Registry related issue label Aug 30, 2021
@shakuzen shakuzen changed the title Test failures with prometheus client 0.12.0 LongTaskTimer issues with prometheus client 0.12.0 Aug 30, 2021
@shakuzen shakuzen added this to the 1.8 tentative milestone Aug 30, 2021
@shakuzen shakuzen added the bug A general bug label Aug 30, 2021
@shakuzen shakuzen modified the milestones: 1.8 tentative, 1.6.11 Aug 30, 2021
@shakuzen shakuzen changed the title LongTaskTimer issues with prometheus client 0.12.0 LongTaskTimer is not described correctly for Prometheus client Aug 30, 2021
@shakuzen
Copy link
Member Author

This looks like a long standing issue with the implementation of the describe method for our MicrometerCollector for LongTaskTimers in the Prometheus registry. There are two MetricFamilySamples with the same name for LongTaskTimer, as opposed to the way the Timer and DistributionSummary description works: distinct MetricFamilySamples.

@shakuzen shakuzen changed the title LongTaskTimer is not described correctly for Prometheus client LongTaskTimer: Failed to register Collector of type MicrometerCollector: The Collector exposes the same name multiple times Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A general bug registry: prometheus A Prometheus Registry related issue
Projects
None yet
Development

No branches or pull requests

1 participant