telemetry

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendTransferMetadataToContext

func AppendTransferMetadataToContext(ctx context.Context, md model.TransferMetadata) context.Context

AppendTransferMetadataToContext appends transfer metadata to context

func FinishSpan added in v0.1.2

func FinishSpan(span trace.Span, err error)

func InitTracing added in v0.1.2

func InitTracing(ctx context.Context, tracingCollector *config.Collector, serviceName string) error

InitTracing creates and registers globally a new TracerProvider.

func StartSpan added in v0.1.2

func StartSpan(
	ctx context.Context,
	tracer trace.Tracer,
	spanName string,
	req TraceableObject,
	attributes ...attribute.KeyValue,
) (context.Context, trace.Span)

StartSpan creates a new span with the provided context, tracer and [TransferDataGetter]. [TransferDataGetter] is used to extract transfer-related attributes for the span. It is a client responsibility to call FinishSpan when the span is no longer needed.

func TransferMetadataFromContext

func TransferMetadataFromContext(ctx context.Context) model.TransferMetadata

TransferMetadataFromContext extracts transfer metadata from context

func TransientMapFromContext

func TransientMapFromContext(ctx context.Context) map[string][]byte

TransientMapFromContext prepares tracing context for using in transient map

Types

type TraceableObject added in v0.1.2

type TraceableObject interface {
	GetTraceAttributes() []attribute.KeyValue
}

Jump to

Keyboard shortcuts

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