NewHistogramVec creates a new HistogramVec based on the provided HistogramVecOpts.
(opts HistogramVecOpts)
| 1185 | |
| 1186 | // NewHistogramVec creates a new HistogramVec based on the provided HistogramVecOpts. |
| 1187 | func (v2) NewHistogramVec(opts HistogramVecOpts) *HistogramVec { |
| 1188 | desc := V2.NewDesc( |
| 1189 | BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), |
| 1190 | opts.Help, |
| 1191 | opts.VariableLabels, |
| 1192 | opts.ConstLabels, |
| 1193 | ) |
| 1194 | return &HistogramVec{ |
| 1195 | MetricVec: NewMetricVec(desc, func(lvs ...string) Metric { |
| 1196 | return newHistogram(desc, opts.HistogramOpts, lvs...) |
| 1197 | }), |
| 1198 | } |
| 1199 | } |
| 1200 | |
| 1201 | // GetMetricWithLabelValues returns the Histogram for the given slice of label |
| 1202 | // values (same order as the variable labels in Desc). If that combination of |
no test coverage detected