modern-trace is the shared C++23 trace contract for the modern_* repositories. It owns the reusable tracing surface that should not live in a domain package: W3C traceparent parsing/formatting, the shared TraceContext, PMR-aware in-memory buffering, fixed-size drain queues, logger fan-in, and background-drain coordination.
modern.trace: umbrella module for the trace contractmodern::trace::TraceContext: shared value type for runtime and domain boundariesparse_traceparent()/format_traceparent(): W3C wire-format conversionInMemoryTraceBuffer,SpscTraceDrainQueue,TraceLogger,TraceLoggerFanInTraceDrainSignal,TraceDrainPump,TraceBackgroundDrainController
modern_trace intentionally does not own schedulers, threads, timers, or domain-specific networking/file abstractions. Those stay in modern_runtime and higher-level repos.
cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER=clang++
cmake --build build
ctest --test-dir build --output-on-failureRequirements:
- CMake 3.28+
- C++23 compiler with module support
- Clang + Ninja is the primary validated path
Build-tree use:
add_subdirectory(modern_trace)
target_link_libraries(my_app PRIVATE modern_trace::modern_trace)Installed package use:
find_package(modern_trace CONFIG REQUIRED)
target_link_libraries(my_app PRIVATE modern_trace::modern_trace)Import the module you need:
import modern.trace;