metrics

package
v0.0.0-...-b45fe33 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

Metrics acts as an OTel metrics manager.

func NewMetrics

func NewMetrics(ctx context.Context, endpoint string) (*Metrics, error)

NewMetrics initializes the OTel metric exporter and meter provider.

func (*Metrics) GetMeter

func (m *Metrics) GetMeter(instrumentationName string) metric.Meter

GetMeter returns a named meter for instrumentation.

func (*Metrics) Shutdown

func (m *Metrics) Shutdown(ctx context.Context) error

Shutdown gracefully shuts down the meter provider and flushes any remaining metrics.

Jump to

Keyboard shortcuts

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