Documentation ¶
Overview ¶
Copyright 2023 The Kanister Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func InitCounter(r prometheus.Registerer, opts prometheus.CounterOpts) prometheus.Counter
- func InitCounterVec(r prometheus.Registerer, opts prometheus.CounterOpts, bl []BoundedLabel) *prometheus.CounterVec
- func InitGauge(r prometheus.Registerer, opts prometheus.GaugeOpts) prometheus.Gauge
- func InitGaugeVec(r prometheus.Registerer, opts prometheus.GaugeOpts, bl []BoundedLabel) *prometheus.GaugeVec
- func InitHistogram(r prometheus.Registerer, opts prometheus.HistogramOpts) prometheus.Histogram
- func InitHistogramVec(r prometheus.Registerer, opts prometheus.HistogramOpts, bl []BoundedLabel) *prometheus.HistogramVec
- type BoundedLabel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitCounter ¶
func InitCounter(r prometheus.Registerer, opts prometheus.CounterOpts) prometheus.Counter
InitCounter initializes a new counter. The method panics if there are any errors (except for AlreadyRegisteredError) during the registration of the metric.
func InitCounterVec ¶
func InitCounterVec(r prometheus.Registerer, opts prometheus.CounterOpts, bl []BoundedLabel) *prometheus.CounterVec
InitCounterVec initializes and registers the counter metrics vector. It takes a list of BoundedLabel objects - if any label value or label name is nil, then this method will panic. Based on the combinations returned by generateCombinations, it will set each counter value to 0. If a nil counter is returned during the registration, the method will panic.
func InitGauge ¶
func InitGauge(r prometheus.Registerer, opts prometheus.GaugeOpts) prometheus.Gauge
InitGauge initializes a new gauge metric. The method panics if there are any errors (except for AlreadyRegisteredError) during the registration of the metric.
func InitGaugeVec ¶
func InitGaugeVec(r prometheus.Registerer, opts prometheus.GaugeOpts, bl []BoundedLabel) *prometheus.GaugeVec
InitGaugeVec initializes the gauge metrics vector. It takes a list of BoundedLabels, but the LabelValue field of each BoundedLabel will be ignored. The method panics if there are any errors (except for AlreadyRegisteredError) during the registration of the metric.
func InitHistogram ¶
func InitHistogram(r prometheus.Registerer, opts prometheus.HistogramOpts) prometheus.Histogram
InitHistogram initializes a new histogram metric. The method panics if there are any errors (except for AlreadyRegisteredError) during the registration of the metric.
func InitHistogramVec ¶
func InitHistogramVec(r prometheus.Registerer, opts prometheus.HistogramOpts, bl []BoundedLabel) *prometheus.HistogramVec
InitHistogramVec initializes the histogram metrics vector. It takes a list of BoundedLabels, but the LabelValue field of each BoundedLabel will be ignored. The method panics if there are any errors (except for AlreadyRegisteredError) during the registration of the metric.
Types ¶
type BoundedLabel ¶
BoundedLabel is a type that represents a label and its associated valid values.