Skip to content

The Collector exposes the same name multiple times: jvm_classes_loaded #699

@fmmr

Description

@fmmr

Upgrading to 0.12.0 causes our apps to crash with the following error. This looks related to the note on the release note from 0.12.0. 0.11.0 works like a charm:

Caused by: java.lang.IllegalArgumentException: Failed to register Collector of type ClassLoadingExports: The Collector exposes the same name multiple times: jvm_classes_loaded
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.prometheus.client.hotspot.DefaultExports.register(DefaultExports.java:43)
at io.prometheus.client.hotspot.DefaultExports.initialize(DefaultExports.java:28)
at no.finntech.search.solr.searchhandler.PrometheusResponseWriter.(PrometheusResponseWriter.java:27)
... 19 more

One example is trying to start SOLR with prometheus included, and a call to hotspot:DefaultExports.initialize()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions