observability

package
v0.7.21 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndSpan

func EndSpan(span oteltrace.Span, err error)

EndSpan records err on the span and ends it.

func StartSpan

func StartSpan(ctx context.Context, name string, attrs ...attribute.KeyValue) (context.Context, oteltrace.Span)

StartSpan begins a child span on the service tracer.

Types

type ExpvarLabel

type ExpvarLabel struct {
	Name  string
	Value string
}

type ExpvarSample

type ExpvarSample struct {
	Name   string
	Labels []ExpvarLabel
	Int64  *int64
	Float  *float64
}

func CollectAerolVMExpvars

func CollectAerolVMExpvars() []ExpvarSample

type MetricsShutdown

type MetricsShutdown func(context.Context) error

func StartOTELMetrics

func StartOTELMetrics(ctx context.Context, logger *slog.Logger, cfg OTELMetricsConfig) (MetricsShutdown, error)

type OTELMetricsConfig

type OTELMetricsConfig struct {
	Enabled     bool
	Endpoint    string
	Interval    time.Duration
	ServiceName string
	NodeID      string
	NodeRole    string
}

type OTELTracesConfig

type OTELTracesConfig struct {
	Enabled     bool
	Endpoint    string
	SampleRatio float64
	ServiceName string
	NodeID      string
	NodeRole    string
}

type TracesShutdown

type TracesShutdown func(context.Context) error

func StartOTELTraces

func StartOTELTraces(ctx context.Context, logger *slog.Logger, cfg OTELTracesConfig) (TracesShutdown, error)

Jump to

Keyboard shortcuts

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