metrics

package
v0.0.0-...-751a432 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCounter

InitCounter initializes a new counter. The method panics if there are any errors (except for AlreadyRegisteredError) during the registration of the metric.

func InitCounterVec

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

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

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

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

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

type BoundedLabel struct {
	LabelName   string
	LabelValues []string
}

BoundedLabel is a type that represents a label and its associated valid values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL