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

Function NewGaugeVec

prometheus/gauge.go:152–157  ·  view source on GitHub ↗

NewGaugeVec creates a new GaugeVec based on the provided GaugeOpts and partitioned by the given label names.

(opts GaugeOpts, labelNames []string)

Source from the content-addressed store, hash-verified

150// NewGaugeVec creates a new GaugeVec based on the provided GaugeOpts and
151// partitioned by the given label names.
152func NewGaugeVec(opts GaugeOpts, labelNames []string) *GaugeVec {
153 return V2.NewGaugeVec(GaugeVecOpts{
154 GaugeOpts: opts,
155 VariableLabels: UnconstrainedLabels(labelNames),
156 })
157}
158
159// NewGaugeVec creates a new GaugeVec based on the provided GaugeVecOpts.
160func (v2) NewGaugeVec(opts GaugeVecOpts) *GaugeVec {

Callers 15

ExampleGaugeVecFunction · 0.92
ExampleGatherersFunction · 0.92
TestWriteToTextfileFunction · 0.92
BenchmarkCompressionFunction · 0.92
NewGaugeVecMethod · 0.92
TestDeleteFunction · 0.70
TestDeleteWithCollisionsFunction · 0.70
TestDeleteLabelValuesFunction · 0.70
TestDeletePartialMatchFunction · 0.70
TestMetricVecFunction · 0.70

Calls 2

UnconstrainedLabelsTypeAlias · 0.85
NewGaugeVecMethod · 0.45

Tested by 15

ExampleGaugeVecFunction · 0.74
ExampleGatherersFunction · 0.74
TestWriteToTextfileFunction · 0.74
BenchmarkCompressionFunction · 0.74
TestDeleteFunction · 0.56
TestDeleteWithCollisionsFunction · 0.56
TestDeleteLabelValuesFunction · 0.56
TestDeletePartialMatchFunction · 0.56
TestMetricVecFunction · 0.56