From eb7e1020155b9da91a245556a56cec0cf58e0cb8 Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Thu, 12 Mar 2026 13:01:57 +0000 Subject: [PATCH] Fix codecov: exclude OTel collector path in CollectorManager from coverage The else-if branch for server=="otel" in CollectorManager.cpp is never reached in unit tests (no test configures [insight] with server=otel). Mark it with LCOV_EXCL_START/STOP to exclude from patch coverage. Co-Authored-By: Claude Opus 4.6 --- src/xrpld/app/main/CollectorManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xrpld/app/main/CollectorManager.cpp b/src/xrpld/app/main/CollectorManager.cpp index 2dfbd87a28..0844019846 100644 --- a/src/xrpld/app/main/CollectorManager.cpp +++ b/src/xrpld/app/main/CollectorManager.cpp @@ -23,6 +23,7 @@ public: m_collector = beast::insight::StatsDCollector::New(address, prefix, journal); } + // LCOV_EXCL_START -- OTel collector path is not exercised in unit tests else if (server == "otel") { // Read OTLP metrics endpoint from [insight] section. @@ -39,6 +40,7 @@ public: m_collector = beast::insight::OTelCollector::New(endpoint, prefix, instanceId, journal); } + // LCOV_EXCL_STOP else { m_collector = beast::insight::NullCollector::New();