Documentation
¶
Overview ¶
Package tracecontext preserves the caller's trace identity independently of spans created while processing the request.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPMiddleware ¶
func HTTPMiddleware() middleware.Interface
HTTPMiddleware captures the caller's trace headers before request processing.
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(ctx context.Context, req any, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)
UnaryServerInterceptor captures the caller's trace from incoming gRPC metadata. Extracting independently of the active span also handles tracing stats handlers, which run before unary interceptors and may already have created a local trace.
func UpstreamTraceID ¶
UpstreamTraceID returns the trace ID extracted at ingress, or an empty string if the caller did not supply a valid trace. It never falls back to local spans.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.