mirror of
https://github.com/XRPLF/rippled.git
synced 2026-03-18 02:32:26 +00:00
Fix codecov: exclude telemetry ifdef block in Log.cpp from coverage
The trace context injection block is compiled out when XRPL_ENABLE_TELEMETRY is not defined (coverage builds). codecov still counts preprocessor-excluded lines as uncovered in the source diff. Wrap with LCOV_EXCL_START/STOP. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -357,6 +357,7 @@ Logs::format(
|
||||
// Phase 8: Inject OTel trace context (trace_id, span_id) into log lines
|
||||
// for log-trace correlation. Only appended when an active span exists.
|
||||
// GetSpan() reads thread-local storage — no locks, <10ns overhead.
|
||||
// LCOV_EXCL_START -- compiled out when XRPL_ENABLE_TELEMETRY is not defined
|
||||
#ifdef XRPL_ENABLE_TELEMETRY
|
||||
{
|
||||
auto span =
|
||||
@@ -377,6 +378,7 @@ Logs::format(
|
||||
}
|
||||
}
|
||||
#endif // XRPL_ENABLE_TELEMETRY
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
output += message;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user