Global context-aware logging macros that inherit parent context
These can be used in any function to automatically include context from parent functions with span
Automatically capture and preserve current context for function execution
This ensures context is maintained across function boundaries without user intervention
Capture current context and store it globally for cross-boundary persistence
This function is automatically called by the macro to ensure context is preserved
Get inherited context as a formatted string for automatic span propagation
This function retrieves all context fields from the current span context
and formats them as a string for logging
Helper function to capture context for closure boundaries
This captures the current context and returns a closure that restores it
Usage: let captured = with_context_capture1(|arg| { /* your code */ });