Help us shape the future of Go! Take the 2026 Go Developer Survey

meter

package
v0.29.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address     string
	Insecure    bool
	Username    string
	Password    string
	ServiceName string
}

Config holds the metrics configuration.

type OTLPProvider

type OTLPProvider struct {
	embedded.MeterProvider
	// contains filtered or unexported fields
}

OTLPProvider is a metrics provider which exports metrics to OTLP.

func NewOTLPProvider

func NewOTLPProvider(ctx context.Context, cfg Config) (*OTLPProvider, error)

NewOTLPProvider creates a new OTLPProvider.

func (*OTLPProvider) Meter

func (p *OTLPProvider) Meter(name string, options ...metric.MeterOption) metric.Meter

Meter returns a Meter with the given name and configured with options.

func (*OTLPProvider) Stop

func (p *OTLPProvider) Stop(ctx context.Context) error

Stop stops the provider once all metrics have been uploaded.

Jump to

Keyboard shortcuts

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