metrics

package
v2.0.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package metrics sets up metrics and creates a metrics service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParentLogger

type ParentLogger interface {
	New(options ...log.Option) *log.Logger
}

type PrometheusGatherer

type PrometheusGatherer interface {
	Gather() ([]*dto.MetricFamily, error)
}

type Service

type Service interface {
	String() string
	Start(ctx context.Context) (runError <-chan error, startErr error)
	Stop() (err error)
}

func New

func New(settings config.Metrics,
	parentLogger ParentLogger, prometheusGatherer PrometheusGatherer) (
	service Service, err error)

Directories

Path Synopsis
Package noop initializes all No-op metrics objects.
Package noop initializes all No-op metrics objects.
Package prometheus offers a New function to return a Prometheus HTTP server together with all the metrics registered.
Package prometheus offers a New function to return a Prometheus HTTP server together with all the metrics registered.

Jump to

Keyboard shortcuts

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