tracing

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: GPL-3.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = config.GetConfig()

Functions

func AddBaggage

func AddBaggage(ctx context.Context, key string, value string) context.Context

func GetTraceIDFromSpan

func GetTraceIDFromSpan(span trace.Span) string

func GetTracer

func GetTracer() *sdktrace.TracerProvider

GetTracer returns the globally initialized tracer provider

func NewTracer

func NewTracer() (*sdktrace.TracerProvider, error)

NewTracer initializes the tracer directly

func NewTracingMiddleware added in v0.3.1

func NewTracingMiddleware() gin.HandlerFunc

Types

type SpanWrapper

type SpanWrapper struct {
	trace.Span
}

func NewSpanWrapper

func NewSpanWrapper(ctx context.Context, name string) (context.Context, *SpanWrapper)

func (*SpanWrapper) GetTraceID

func (s *SpanWrapper) GetTraceID() string

func (*SpanWrapper) LogError

func (s *SpanWrapper) LogError(err error)

func (*SpanWrapper) WithStandardAttributes

func (s *SpanWrapper) WithStandardAttributes(ctx context.Context) *SpanWrapper

WithStandardAttributes adds standard attributes like user ID, request ID, etc.

Jump to

Keyboard shortcuts

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