telemetry

package
v0.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Configs = configset.Set[Config]{
	Default: &Config{Enabled: true, ServiceName: "ak", Endpoint: "localhost:4318"},
	Dev:     &Config{Enabled: false, ServiceName: "ak", Endpoint: "localhost:4318"},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled     bool   `koanf:"enabled"`
	ServiceName string `koanf:"service_name"`
	Endpoint    string `koanf:"endpoint"`
}

type Telemetry

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

func New

func New(z *zap.Logger, cfg *Config) (*Telemetry, error)

func (*Telemetry) NewCounter

func (t *Telemetry) NewCounter(name string, description string) (metric.Int64Counter, error)

func (*Telemetry) NewHistogram added in v0.9.0

func (t *Telemetry) NewHistogram(name string, description string) (metric.Int64Histogram, error)

func (*Telemetry) NewUpDownCounter

func (t *Telemetry) NewUpDownCounter(name string, description string) (metric.Int64UpDownCounter, error)

Jump to

Keyboard shortcuts

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