Skip to main content

Module

Utilities for distributed tracing with Splunk AO.

get_tracing_headers

Get tracing headers for distributed tracing (decorator usage). Returns headers from the singleton logger context that can be passed to downstream services. For direct logger instances, use logger.get_tracing_headers() instead. Raises
  • SplunkAOLoggerException: If not in distributed mode or if no trace has been started
Returns
  • dict[str, str]: Dictionary with Splunk-AO-Trace-ID and Splunk-AO-Parent-ID headers
Examples Using with decorators to propagate trace context to downstream services: