metrics

package
v0.0.0-...-c10446a Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package metrics holds the implementation for exposing adapter metrics to prometheus

Index

Constants

View Source
const (
	// PrometheusMetricType prometheus metric type
	PrometheusMetricType = "prometheus"
)

Variables

This section is empty.

Functions

func RegisterPrometheusCollector

func RegisterPrometheusCollector()

RegisterPrometheusCollector registers the Prometheus collector for metrics.

Types

type AdapterCollector

type AdapterCollector struct {
	commonmetrics.Collector
	// contains filtered or unexported fields
}

AdapterCollector contains the descriptions of the custom metrics exposed by the adapter. It also uses the metrics defined in common-go-libs

func (*AdapterCollector) Collect

func (collector *AdapterCollector) Collect(ch chan<- prometheus.Metric)

Collect collects all the relevant Prometheus metrics.

func (*AdapterCollector) Describe

func (collector *AdapterCollector) Describe(ch chan<- *prometheus.Desc)

Describe sends all the descriptors of the metrics collected by this Collector to the provided channel.

Jump to

Keyboard shortcuts

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