metrics

package
v0.0.0-...-ccaa6ab Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCounter

func NewCounter(opts prometheus.CounterOpts) prometheus.Counter

NewCounter creates a new Prometheus Counter metric with the given options.

func NewGauge

func NewGauge(opts prometheus.GaugeOpts) prometheus.Gauge

NewGauge creates a new Prometheus Gauge metric with the given options.

func NewHistogram

func NewHistogram(opts prometheus.HistogramOpts) prometheus.Histogram

NewHistogram creates a new Prometheus Histogram metric with the given options.

func NewSummary

func NewSummary(opts prometheus.SummaryOpts) prometheus.Summary

NewSummary creates a new Prometheus Summary metric with the given options.

func Register

func Register(c prometheus.Collector)

func RegisterMirMetrics

func RegisterMirMetrics(appName string, appVersion string, pinnedTags map[string]string, config string)

RegisterMirMetrics registers the Mir-specific metrics for the application. It takes the following parameters:

  • appName: The name of the Mir application.
  • appVersion: The version of the Mir application.
  • pinnedTags: Additional tags to be added to the metrics.
  • config: The configuration of the Mir application.

TODO

  • pinned tag should be use with prometheus scraper instead
  • perhaps could be use for device id on device lib

func RegisterRoutes

func RegisterRoutes(r *http.ServeMux)

RegisterRoutes registers the /metrics route for exposing the Prometheus metrics.

func Registry

func Registry() *prometheus.Registry

Types

This section is empty.

Jump to

Keyboard shortcuts

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