Documentation
¶
Overview ¶
Package requesttrace reads the OpenTelemetry trace ID of a go-restful request, which the access and event logs write as trace_id.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TraceID ¶
TraceID returns the trace ID of the span in the request context, otherwise that of the trace context the request arrived with (read with the global propagator), otherwise "". It never falls back to X-Ab-TraceID.
Call it after the filter chain, so it sees a span that a later filter put on the request, such as observability-go-sdk's request filter registered after the logging filter.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.