metrics

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGatherer

func RegisterGatherer(g promcli.Gatherer)

func Start

func Start(mux *http.ServeMux, options ...Option) error

Start metrics exporter.

func Stop

func Stop()

Stop metrics exporter.

Types

type Option

type Option func(*metrics) error

Option represents an option which can be applied to metrics.

func WithExporterDisabled

func WithExporterDisabled(disabled bool) Option

WithExporterDisabled can be used to disable the metrics exporter.

func WithPeriod

func WithPeriod(period time.Duration) Option

WithPeriod sets the internal metrics collection period.

func WithServiceName

func WithServiceName(name string) Option

WithServiceName sets the service name reported for metrics.

Jump to

Keyboard shortcuts

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