telemetry

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSpan

func NewSpan(ctx context.Context, name string) (context.Context, trace.Span)

func RecordError

func RecordError(span trace.Span, err error)

Taken from unkey: https://github.com/unkeyed/unkey/blob/f847d33454dede29392ae19eae498b9503506db2/apps/agent/pkg/tracing/util.go#L8 RecordError sets the status of the span to error if the error is not nil.

func WithAttributes

func WithAttributes(span trace.Span, attrs ...AttributeKV)

Types

type AttributeKV

type AttributeKV struct {
	Key   AttributeKey
	Value any
}

AttributeKV is a wrapper for otel attributes KV

type AttributeKey

type AttributeKey string

Jump to

Keyboard shortcuts

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