On 25 Jul 11:49, Sicheng wrote:
> Hello:
>     We are using the golang Prometheus package, and the metrics is pulled 
> from the /metric endpoint of the HTTP server.
> https://pkg.go.dev/github.com/prometheus/client_golang
> The package provides a function called unregister.
> I want to know what is the use case for this function? 
> In some UTs, we called the unregister function to make sure the code will 
> not panic. 
> Apart from that, is there any place I should call the unregister function?
> 
> Best regards

Unregister is mainly there for unit tests. I think it is very uncommon to see it
used elsewhere.

> 
> -- 
> 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/2adf21ef-a032-483f-a5b1-afe3016f4165n%40googlegroups.com.


-- 
Julien Pivotto
@roidelapluie

-- 
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/ZMBK3XgknjK5avkv%40nixos.

Reply via email to