trace

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) string

FromContext extracts the trace ID from context, or returns "".

func HTTPMiddleware

func HTTPMiddleware(next http.Handler) http.Handler

HTTPMiddleware extracts or generates a trace ID from the X-Trace-Id header and injects it into the request context.

func NewContext

func NewContext(ctx context.Context) context.Context

NewContext returns a context with a new trace ID.

func WithTraceID

func WithTraceID(ctx context.Context, id string) context.Context

WithTraceID returns a context with the given trace ID.

Types

This section is empty.

Jump to

Keyboard shortcuts

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