telemetry

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 14 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

func WithLabels

func WithLabels(args ...string) metric.MeasurementOption

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) 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