telemetry

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEvent

func AddEvent(ctx context.Context, name string, attrs ...attribute.KeyValue)

AddEvent adds an event to the current span

func InitTracer

func InitTracer(cfg Config) (*sdktrace.TracerProvider, error)

InitTracer initializes OpenTelemetry tracer with OTLP exporter

func RecordError

func RecordError(ctx context.Context, err error)

RecordError records an error in the current span

func StartSpan

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

StartSpan starts a new span

Types

type Config

type Config struct {
	ServiceName string
	Endpoint    string
	Environment string
}

Config configures telemetry

Jump to

Keyboard shortcuts

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