requesttrace

package
v4.29.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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

func TraceID(req *restful.Request) string

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.

Jump to

Keyboard shortcuts

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