telemetry

package
v0.73.81 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectUniqueTenantIDs

func CollectUniqueTenantIDs[T any](items []T, extractFn func(T) string) []string

CollectUniqueTenantIDs extracts unique tenant IDs from a slice of items. The extractFn should return the tenant ID string for each item.

func GetCarrier

func GetCarrier(ctx context.Context) map[string]string

func InitTracer

func InitTracer(opts *TracerOpts) (func(context.Context) error, error)

func NewSpan

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

func NewSpanWithCarrier

func NewSpanWithCarrier(ctx context.Context, name string, carrier map[string]string) (context.Context, trace.Span)

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

type TracerOpts

type TracerOpts struct {
	ServiceName   string
	CollectorURL  string
	Insecure      bool
	TraceIdRatio  string
	CollectorAuth string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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