monitoring

package
v0.0.0-...-577c19e Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Monitoring configuration
	Monitoring RegistryConfig `json:"monitoring"`
}

type RegistererGatherer

type RegistererGatherer interface {
	prometheus.Registerer
	prometheus.Gatherer
}

type Registry

type Registry struct {
	// Inherited prometheus registry.
	RegistererGatherer
	// contains filtered or unexported fields
}

Custom prometheus registry that adds functionality to the default registry.

func NewRegistry

func NewRegistry(config Config) *Registry

Create a new registry with the given configuration. This registry will include the default go collector and process collector.

func WrapRegistry

func WrapRegistry(registry RegistererGatherer, config Config) *Registry

func (*Registry) Gather

func (r *Registry) Gather() ([]*dto.MetricFamily, error)

Custom gather method that adds custom labels to all metrics.

type RegistryConfig

type RegistryConfig struct {
	// The labels to add to all metrics.
	Labels map[string]string `json:"labels"`

	// The port to expose the metrics on.
	Port int `json:"port"`
}

Configuration for our custom registry.

Jump to

Keyboard shortcuts

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