metrics

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: Apache-2.0 Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCounter

func CreateCounter(registerer prometheus.Registerer, metricName string, metricsSubsystem string) prometheus.Counter

CreateCounter creates a single Counter for tracking a cumulative metric. Pass prometheus.DefaultRegisterer for production use; inject a fresh prometheus.NewRegistry() in tests.

func CreateCounterVec

func CreateCounterVec(registerer prometheus.Registerer, metricName string, labelNames []string, metricsSubsystem string) *prometheus.CounterVec

CreateCounterVec creates a CounterVec for tracking multiple counters with distinct label sets. Pass prometheus.DefaultRegisterer for production use; inject a fresh prometheus.NewRegistry() in tests.

func CreateGauge

func CreateGauge(registerer prometheus.Registerer, metricName string, metricsSubsystem string) prometheus.Gauge

CreateGauge creates a Gauge for representing a single numerical value that can go up and down. Pass prometheus.DefaultRegisterer for production use; inject a fresh prometheus.NewRegistry() in tests.

func CreateGaugeVec

func CreateGaugeVec(registerer prometheus.Registerer, metricName string, labelNames []string, metricsSubsystem string) *prometheus.GaugeVec

CreateGaugeVec creates a GaugeVec for tracking multiple gauges with distinct label sets. Pass prometheus.DefaultRegisterer for production use; inject a fresh prometheus.NewRegistry() in tests.

func CreateHistogram

func CreateHistogram(registerer prometheus.Registerer, metricName string, metricsSubsystem string) prometheus.Histogram

CreateHistogram creates a Histogram for sampling observations over specified buckets. Pass prometheus.DefaultRegisterer for production use; inject a fresh prometheus.NewRegistry() in tests.

func CreateHistogramVec

func CreateHistogramVec(registerer prometheus.Registerer, metricName string, labelNames []string, metricsSubsystem string) *prometheus.HistogramVec

CreateHistogramVec creates a HistogramVec for tracking multiple histograms with distinct label sets. Pass prometheus.DefaultRegisterer for production use; inject a fresh prometheus.NewRegistry() in tests.

func CreateSummary

func CreateSummary(registerer prometheus.Registerer, metricName string, metricsSubsystem string) prometheus.Summary

CreateSummary creates a Summary for tracking the size and number of events. Pass prometheus.DefaultRegisterer for production use; inject a fresh prometheus.NewRegistry() in tests.

func CreateSummaryVec

func CreateSummaryVec(registerer prometheus.Registerer, metricName string, labelNames []string, metricsSubsystem string) *prometheus.SummaryVec

CreateSummaryVec creates a SummaryVec for tracking multiple summaries with distinct label sets. Pass prometheus.DefaultRegisterer for production use; inject a fresh prometheus.NewRegistry() in tests.

func RequestDurationHistogram

func RequestDurationHistogram(registerer stdprometheus.Registerer, namespace string, serviceName string) gokitmetrics.Histogram

RequestDurationHistogram returns a standard request duration histogram. Pass prometheus.DefaultRegisterer for production use; inject a fresh prometheus.NewRegistry() in tests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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