Collector already registered that provides name

73 views
Skip to first unread message

Manish G

unread,
Jan 14, 2021, 3:45:35 AM1/14/21
to Prometheus Users
I am trying to add a prometheus java client histogram metrics, but I keep getting this error on application launch:

Prometheus Error: Collector already registered that provides name:<name of my histogram metrics>

What can be the cause?


Bartłomiej Płotka

unread,
Jan 14, 2021, 8:02:20 AM1/14/21
to Manish G, Prometheus Users
Hey, 

Your application has probably already registered such metrics. The most popular cause of this is using globals (please avoid those) or and registration of metric on request path or something (it should be on binary/application start only).


Kind Regards,
Bartek Płotka (@bwplotka)


--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAOFd6igJxyVQjM6_ewbvQnEF-dZDFY4wabfUjQkrabiX61Kcsw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages