MCPcopy
hub / github.com/prometheus/client_golang / newThirdPartyLibFoo

Function newThirdPartyLibFoo

prometheus/examples_test.go:858–867  ·  view source on GitHub ↗
(reg prometheus.Registerer)

Source from the content-addressed store, hash-verified

856}
857
858func newThirdPartyLibFoo(reg prometheus.Registerer) struct{} {
859 foo := struct{}{}
860 // Register the metrics of the third party lib.
861 c := promauto.With(reg).NewGauge(prometheus.GaugeOpts{
862 Name: "foo",
863 Help: "Registered forever.",
864 })
865 c.Set(1)
866 return foo
867}

Callers 1

ExampleWrapCollectorWithFunction · 0.85

Calls 3

SetMethod · 0.95
WithFunction · 0.92
NewGaugeMethod · 0.80

Tested by

no test coverage detected