telemetry

package
v0.22.8 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 24 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, options ...trace.EventOption)

func CallWithTelemetry

func CallWithTelemetry[TResult any](tracer trace.Tracer, spanName string, parentCtx context.Context, fn func(ctx context.Context) (TResult, error)) (TResult, error)

func CallWithTelemetryNoResult

func CallWithTelemetryNoResult(tracer trace.Tracer, spanName string, parentCtx context.Context, fn func(ctx context.Context) error) error

func CallWithTelemetryOnErrorOnly

func CallWithTelemetryOnErrorOnly[TResult any](tracer trace.Tracer, spanName string, parentCtx context.Context, fn func(ctx context.Context) (TResult, error)) (TResult, error)

func GetMeter

func GetMeter(meterName string) metric.Meter

func GetTracer

func GetTracer(tracerName string) trace.Tracer

func HashValue

func HashValue(value string) string

func NewInt64Counter

func NewInt64Counter(meter metric.Meter, name string, description string) metric.Int64Counter

func NewInt64UpDownCounter

func NewInt64UpDownCounter(meter metric.Meter, name string, description string) metric.Int64UpDownCounter

func NewSuppressIfSuccessfulSpanProcessor

func NewSuppressIfSuccessfulSpanProcessor(innerSpanProcessor sdktrace.SpanProcessor) sdktrace.SpanProcessor

func SetAttribute

func SetAttribute[T TelemetryAttribute](ctx context.Context, key string, value T)

Types

type TelemetryAttribute

type TelemetryAttribute interface {
	int | int64 | bool | float64 | string | []int | []int64 | []bool | []float64 | []string
}

type TelemetrySystem

type TelemetrySystem struct {
	TracerProvider *sdktrace.TracerProvider
	MeterProvider  *sdkmetric.MeterProvider
	// contains filtered or unexported fields
}

func GetTelemetrySystem

func GetTelemetrySystem() *TelemetrySystem

func (TelemetrySystem) Shutdown

func (ts TelemetrySystem) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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