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

Function NewHistogramVec

prometheus/histogram.go:1179–1184  ·  view source on GitHub ↗

NewHistogramVec creates a new HistogramVec based on the provided HistogramOpts and partitioned by the given label names.

(opts HistogramOpts, labelNames []string)

Source from the content-addressed store, hash-verified

1177// NewHistogramVec creates a new HistogramVec based on the provided HistogramOpts and
1178// partitioned by the given label names.
1179func NewHistogramVec(opts HistogramOpts, labelNames []string) *HistogramVec {
1180 return V2.NewHistogramVec(HistogramVecOpts{
1181 HistogramOpts: opts,
1182 VariableLabels: UnconstrainedLabels(labelNames),
1183 })
1184}
1185
1186// NewHistogramVec creates a new HistogramVec based on the provided HistogramVecOpts.
1187func (v2) NewHistogramVec(opts HistogramVecOpts) *HistogramVec {

Calls 2

UnconstrainedLabelsTypeAlias · 0.85
NewHistogramVecMethod · 0.45

Tested by 15

TestWriteToTextfileFunction · 0.74
makeInstrumentedClientFunction · 0.74
makeInstrumentedHandlerFunction · 0.74
ExampleWithExtraMethodsFunction · 0.74
ExampleWithLabelFromCtxFunction · 0.74
TestToFloat64Function · 0.74
testWriteHistogramFunction · 0.74
TestTimerByOutcomeFunction · 0.56