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

Function NewExpvarCollector

prometheus/collectors/expvar_collector.go:54–57  ·  view source on GitHub ↗

NewExpvarCollector returns a newly allocated expvar Collector. An expvar Collector collects metrics from the expvar interface. It provides a quick way to expose numeric values that are already exported via expvar as Prometheus metrics. Note that the data models of expvar and Prometheus are fundamen

(exports map[string]*prometheus.Desc)

Source from the content-addressed store, hash-verified

52//
53// Anything that does not fit into the scheme above is silently ignored.
54func NewExpvarCollector(exports map[string]*prometheus.Desc) prometheus.Collector {
55 //nolint:staticcheck // Ignore SA1019 until v2.
56 return prometheus.NewExpvarCollector(exports)
57}

Callers

nothing calls this directly

Calls 1

NewExpvarCollectorFunction · 0.92

Tested by

no test coverage detected