telemetry

package
v1.2.119 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsURL = "http://localhost:4318/v1/metrics"
	TracesURL  = "http://localhost:4318/v1/traces"
)

Variables

This section is empty.

Functions

func ChangeMetrics

func ChangeMetrics(changeFunc func(metrics *Metrics))

func Init

func Init(ctx context.Context) error

func IsEnabled

func IsEnabled() bool

func MessageEvent added in v1.2.119

func MessageEvent(ctx context.Context, msg string) error

func NewController

func NewController(exporter *otlpmetric.Exporter) *controller.Controller

func NewMetricExporter added in v1.2.119

func NewMetricExporter(url string) (*otlpmetric.Exporter, error)

func NewTraceExporter added in v1.2.119

func NewTraceExporter(url string) (*otlptrace.Exporter, error)

func SetupMetricExporter added in v1.2.119

func SetupMetricExporter(ctx context.Context, url string) error

func SetupTraceExporter added in v1.2.119

func SetupTraceExporter(ctx context.Context, url string) error

func Shutdown

func Shutdown(ctx context.Context) error

Types

type Metrics

type Metrics struct {
	Version  string
	Command  string
	OS       string
	Arch     string
	ExitCode int
}

func (*Metrics) WriteOpenTelemetry

func (m *Metrics) WriteOpenTelemetry(ctx context.Context, meter metric.Meter) error

Jump to

Keyboard shortcuts

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