I get the following error in some situations. ``` was collected before with the same name and label values ```
On the restart of the target service where the metrics are exposed, It exposes the metrics initially but later start throwing 500 to the prometheus on scrape. On accessing the /metrics endpoint, I see this in the return. was collected before with the same name and label values Could someone help me understand why I am getting this error? I am using golang client of prometheus Looks like the error is being thrown from this line. https://github.com/prometheus/client_golang/blob/main/prometheus/registry.go#L908 I am using go fiber to expose the metrics. func MetricsRoutes(api fiber.Router) { api.Get("/metrics", adaptor.HTTPHandler(promhttp.Handler())) } On my local setup It works fine and only in some environment, i get the. 500 error -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/ad61ea98-0780-4c85-9fb7-860e5a3094f2n%40googlegroups.com.

