prometheushelper

package
v2.7.3 Latest Latest
Warning

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

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

Documentation

Overview

Package prometheushelper provides helper functions for prometheus.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultBodySizeBuckets

func DefaultBodySizeBuckets() []float64

DefaultBodySizeBuckets returns default body size buckets in bytes

func DefaultDurationBuckets

func DefaultDurationBuckets() []float64

DefaultDurationBuckets returns default duration buckets in milliseconds

func DefaultObjectives

func DefaultObjectives() map[float64]float64

DefaultObjectives returns default summary objectives

func NewCounter

func NewCounter(metric string, help string, labels []string) *prometheus.CounterVec

NewCounter creates a counter metric

func NewGauge

func NewGauge(metric string, help string, labels []string) *prometheus.GaugeVec

NewGauge creates a gauge metric

func NewHistogram

func NewHistogram(opt prometheus.HistogramOpts, labels []string) *prometheus.HistogramVec

NewHistogram creates a Histogram metric

func NewSummary

func NewSummary(opt prometheus.SummaryOpts, labels []string) *prometheus.SummaryVec

NewSummary creates a NewSummary metric

func ValidateLabelName

func ValidateLabelName(label string) bool

ValidateLabelName checks if the label name is valid

func ValidateMetricName

func ValidateMetricName(name string) bool

ValidateMetricName checks if the metric name is valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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