type Histogram … type exemplarHistogramMetric … type exemplarHistogramVec … func (h *Histogram) Observe(v float64) { … } // withExemplar initializes the exemplarMetric object and sets the exemplar value. func (h *Histogram) withExemplar(v float64) { … } // withExemplar attaches an exemplar to the metric. func (e *exemplarHistogramMetric) withExemplar(v float64) { … } // NewHistogram returns an object which is Histogram-like. However, nothing // will be measured until the histogram is registered somewhere. func NewHistogram(opts *HistogramOpts) *Histogram { … } // setPrometheusHistogram sets the underlying KubeGauge object, i.e. the thing that does the measurement. func (h *Histogram) setPrometheusHistogram(histogram prometheus.Histogram) { … } // DeprecatedVersion returns a pointer to the Version or nil func (h *Histogram) DeprecatedVersion() *semver.Version { … } // initializeMetric invokes the actual prometheus.Histogram object instantiation // and stores a reference to it func (h *Histogram) initializeMetric() { … } // initializeDeprecatedMetric invokes the actual prometheus.Histogram object instantiation // but modifies the Help description prior to object instantiation. func (h *Histogram) initializeDeprecatedMetric() { … } // WithContext allows the normal Histogram metric to pass in context. The context is no-op now. func (h *Histogram) WithContext(ctx context.Context) ObserverMetric { … } type HistogramVec … func NewHistogramVec(opts *HistogramOpts, labels []string) *HistogramVec { … } // DeprecatedVersion returns a pointer to the Version or nil func (v *HistogramVec) DeprecatedVersion() *semver.Version { … } func (v *HistogramVec) initializeMetric() { … } func (v *HistogramVec) initializeDeprecatedMetric() { … } // WithLabelValues returns the ObserverMetric for the given slice of label // values (same order as the VariableLabels in Desc). If that combination of // label values is accessed for the first time, a new ObserverMetric is created IFF the HistogramVec // has been registered to a metrics registry. func (v *HistogramVec) WithLabelValues(lvs ...string) ObserverMetric { … } // With returns the ObserverMetric for the given Labels map (the label names // must match those of the VariableLabels in Desc). If that label map is // accessed for the first time, a new ObserverMetric is created IFF the HistogramVec has // been registered to a metrics registry. func (v *HistogramVec) With(labels map[string]string) ObserverMetric { … } // Delete deletes the metric where the variable labels are the same as those // passed in as labels. It returns true if a metric was deleted. // // It is not an error if the number and names of the Labels are inconsistent // with those of the VariableLabels in Desc. However, such inconsistent Labels // can never match an actual metric, so the method will always return false in // that case. func (v *HistogramVec) Delete(labels map[string]string) bool { … } // Reset deletes all metrics in this vector. func (v *HistogramVec) Reset() { … } // WithContext returns wrapped HistogramVec with context func (v *HistogramVec) WithContext(ctx context.Context) *HistogramVecWithContext { … } type HistogramVecWithContext … func (h *exemplarHistogramVec) Observe(v float64) { … } func (h *exemplarHistogramVec) withExemplar(v float64) { … } // WithLabelValues is the wrapper of HistogramVec.WithLabelValues. func (vc *HistogramVecWithContext) WithLabelValues(lvs ...string) *exemplarHistogramVec { … } // With is the wrapper of HistogramVec.With. func (vc *HistogramVecWithContext) With(labels map[string]string) *exemplarHistogramVec { … }