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 <noreply@anthropic.com>
This commit is contained in:
Pratik Mankawde
2026-03-12 13:01:57 +00:00
parent 3541deb972
commit eb7e102015

View File

@@ -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();