tracing

package
v0.25.82 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TraceSpanInfo

type TraceSpanInfo struct {
	TraceParent string `json:"traceparent"`
}

func ParseTraceHeader

func ParseTraceHeader(headerContent string) (*TraceSpanInfo, error)

ParseTraceHeader parses X-Trace-Span header content

type TracingSetup

type TracingSetup struct {
	// contains filtered or unexported fields
}

func NewTracing

func NewTracing(ctx context.Context, endpoint string) (*TracingSetup, error)

NewTracing creates a new tracing setup with OTLP exporter

func (*TracingSetup) ExtractSpanContext

func (ts *TracingSetup) ExtractSpanContext(spanInfo *TraceSpanInfo) (trace.SpanContext, error)

ExtractSpanContext extracts span context from TraceSpanInfo

func (*TracingSetup) Shutdown

func (ts *TracingSetup) Shutdown(ctx context.Context) error

Shutdown cleanly shuts down the tracer provider

func (*TracingSetup) StartSpan

func (ts *TracingSetup) StartSpan(ctx context.Context, name string) (trace.Span, context.Context)

StartSpan starts a new span with the given name and parent context

Jump to

Keyboard shortcuts

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