Correlation Context
Thread-local correlation context for distributed tracing and audit trail linkage.
Provides automatic correlation ID generation and propagation across SDK operations, enabling end-to-end request tracing through logs, spans, and audit events.
Compliance (ISO 27001 A.12.4): Enables comprehensive audit trail by linking related operations across service boundaries.
Thread Safety: Uses ThreadLocal storage. Context must be explicitly copied when crossing thread boundaries (e.g., coroutine dispatchers).
Since
0.4.0
Properties
Current correlation ID. Auto-generated if not explicitly set. Format: 16 character lowercase hex string.
Operation name for the current context.
Parent span ID for nested spans, or null if root span.
Functions
Generate a new correlation ID (16 lowercase hex characters).
Generate a new span ID (16 lowercase hex characters) following W3C Trace Context.
Generate a new trace ID (32 lowercase hex characters) following W3C Trace Context.