@@ -44,16 +44,17 @@ var (
44
44
// Name must be set to a non-empty string. DeprecatedVersion is defined only
45
45
// if the metric for which this options applies is, in fact, deprecated.
46
46
type KubeOpts struct {
47
- Namespace string
48
- Subsystem string
49
- Name string
50
- Help string
51
- ConstLabels map [string ]string
52
- DeprecatedVersion string
53
- deprecateOnce sync.Once
54
- annotateOnce sync.Once
55
- StabilityLevel StabilityLevel
56
- LabelValueAllowLists * MetricLabelAllowList
47
+ Namespace string
48
+ Subsystem string
49
+ Name string
50
+ Help string
51
+ ConstLabels map [string ]string
52
+ DeprecatedVersion string
53
+ deprecateOnce sync.Once
54
+ annotateOnce sync.Once
55
+ StabilityLevel StabilityLevel
56
+ initializeLabelAllowListsOnce sync.Once
57
+ LabelValueAllowLists * MetricLabelAllowList
57
58
}
58
59
59
60
// BuildFQName joins the given three name components by "_". Empty name
@@ -160,17 +161,18 @@ func (o *GaugeOpts) toPromGaugeOpts() prometheus.GaugeOpts {
160
161
// and can safely be left at their zero value, although it is strongly
161
162
// encouraged to set a Help string.
162
163
type HistogramOpts struct {
163
- Namespace string
164
- Subsystem string
165
- Name string
166
- Help string
167
- ConstLabels map [string ]string
168
- Buckets []float64
169
- DeprecatedVersion string
170
- deprecateOnce sync.Once
171
- annotateOnce sync.Once
172
- StabilityLevel StabilityLevel
173
- LabelValueAllowLists * MetricLabelAllowList
164
+ Namespace string
165
+ Subsystem string
166
+ Name string
167
+ Help string
168
+ ConstLabels map [string ]string
169
+ Buckets []float64
170
+ DeprecatedVersion string
171
+ deprecateOnce sync.Once
172
+ annotateOnce sync.Once
173
+ StabilityLevel StabilityLevel
174
+ initializeLabelAllowListsOnce sync.Once
175
+ LabelValueAllowLists * MetricLabelAllowList
174
176
}
175
177
176
178
// Modify help description on the metric description.
@@ -206,18 +208,19 @@ func (o *HistogramOpts) toPromHistogramOpts() prometheus.HistogramOpts {
206
208
// and can safely be left at their zero value, although it is strongly
207
209
// encouraged to set a Help string.
208
210
type TimingHistogramOpts struct {
209
- Namespace string
210
- Subsystem string
211
- Name string
212
- Help string
213
- ConstLabels map [string ]string
214
- Buckets []float64
215
- InitialValue float64
216
- DeprecatedVersion string
217
- deprecateOnce sync.Once
218
- annotateOnce sync.Once
219
- StabilityLevel StabilityLevel
220
- LabelValueAllowLists * MetricLabelAllowList
211
+ Namespace string
212
+ Subsystem string
213
+ Name string
214
+ Help string
215
+ ConstLabels map [string ]string
216
+ Buckets []float64
217
+ InitialValue float64
218
+ DeprecatedVersion string
219
+ deprecateOnce sync.Once
220
+ annotateOnce sync.Once
221
+ StabilityLevel StabilityLevel
222
+ initializeLabelAllowListsOnce sync.Once
223
+ LabelValueAllowLists * MetricLabelAllowList
221
224
}
222
225
223
226
// Modify help description on the metric description.
@@ -255,20 +258,21 @@ func (o *TimingHistogramOpts) toPromHistogramOpts() promext.TimingHistogramOpts
255
258
// a help string and to explicitly set the Objectives field to the desired value
256
259
// as the default value will change in the upcoming v0.10 of the library.
257
260
type SummaryOpts struct {
258
- Namespace string
259
- Subsystem string
260
- Name string
261
- Help string
262
- ConstLabels map [string ]string
263
- Objectives map [float64 ]float64
264
- MaxAge time.Duration
265
- AgeBuckets uint32
266
- BufCap uint32
267
- DeprecatedVersion string
268
- deprecateOnce sync.Once
269
- annotateOnce sync.Once
270
- StabilityLevel StabilityLevel
271
- LabelValueAllowLists * MetricLabelAllowList
261
+ Namespace string
262
+ Subsystem string
263
+ Name string
264
+ Help string
265
+ ConstLabels map [string ]string
266
+ Objectives map [float64 ]float64
267
+ MaxAge time.Duration
268
+ AgeBuckets uint32
269
+ BufCap uint32
270
+ DeprecatedVersion string
271
+ deprecateOnce sync.Once
272
+ annotateOnce sync.Once
273
+ StabilityLevel StabilityLevel
274
+ initializeLabelAllowListsOnce sync.Once
275
+ LabelValueAllowLists * MetricLabelAllowList
272
276
}
273
277
274
278
// Modify help description on the metric description.
0 commit comments