metrics

package
v2.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 6 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 Logger

type Logger interface {
	New(options ...log.Option) *log.Logger
	Debug(s string)
	Info(s string)
	Warn(s string)
	Error(s string)
}

type PrometheusGatherer

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

type Service

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

func New

func New(settings settings.Metrics,
	parentLogger Logger, 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