metrics

package
v1.290.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

Module for fx.

Functions

func IsEnabled added in v1.152.0

func IsEnabled(cfg *Config) bool

IsEnabled for metrics.

func MustFloat64Histogram added in v1.161.0

func MustFloat64Histogram(meter metric.Meter, name, description string) metric.Float64Histogram

MustFloat64Histogram for metrics.

func MustFloat64ObservableCounter added in v1.161.0

func MustFloat64ObservableCounter(meter metric.Meter, name, description string) metric.Float64ObservableCounter

MustFloat64ObservableCounter for metrics.

func MustInt64Counter added in v1.161.0

func MustInt64Counter(meter metric.Meter, name, description string) metric.Int64Counter

MustInt64Counter for metrics.

func MustInt64ObservableCounter added in v1.161.0

func MustInt64ObservableCounter(meter metric.Meter, name, description string) metric.Int64ObservableCounter

MustInt64ObservableCounter for metrics.

func MustInt64ObservableGauge added in v1.161.0

func MustInt64ObservableGauge(meter metric.Meter, name, description string) metric.Int64ObservableGauge

MustFloat64Histogram for metrics.

func NewMeter added in v1.96.0

func NewMeter(provider om.MeterProvider, name env.Name) om.Meter

NewMeter for metrics.

func NewMeterProvider added in v1.265.0

func NewMeterProvider(params MeterProviderParams) om.MeterProvider

NewMeterProvider for metrics.

func NewReader added in v1.172.0

func NewReader(cfg *Config) (sm.Reader, error)

NewReader for metrics. A nil reader means disabled.

Types

type Config added in v1.152.0

type Config struct {
	Headers header.Map `yaml:"headers,omitempty" json:"headers,omitempty" toml:"headers,omitempty"`
	Kind    string     `yaml:"kind,omitempty" json:"kind,omitempty" toml:"kind,omitempty"`
	URL     string     `yaml:"url,omitempty" json:"url,omitempty" toml:"url,omitempty"`
}

Config for metrics.

func (*Config) IsOTLP added in v1.152.0

func (c *Config) IsOTLP() bool

IsOTLP configuration.

func (*Config) IsPrometheus added in v1.191.1

func (c *Config) IsPrometheus() bool

IsPrometheus configuration.

type MeterParams added in v1.172.0

type MeterParams struct {
	fx.In

	Config   *Config
	Provider om.MeterProvider
	Name     env.Name
}

MeterParams for metrics.

type MeterProviderParams added in v1.265.0

type MeterProviderParams struct {
	fx.In

	Lifecycle   fx.Lifecycle
	Config      *Config
	Reader      sm.Reader
	Environment env.Environment
	Version     env.Version
	Name        env.Name
}

MeterProviderParams for metrics.

Jump to

Keyboard shortcuts

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