From 63e2febb707bb4fb19bb06785c8ba57e6db5867e Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Mon, 20 Jul 2026 16:04:17 +0100 Subject: [PATCH] fix(telemetry): link in-memory exporter component into xrpl_tests The umbrella opentelemetry-cpp target's link set omits the in-memory exporter library, so xrpl_tests failed to link with an undefined reference to InMemorySpanExporterFactory::Create. The SpanGuardScope tests use an InMemorySpanExporter to read exported spans. Link the opentelemetry-cpp::exporter_in_memory component explicitly. Test-only: production code never uses this exporter. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/tests/libxrpl/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/tests/libxrpl/CMakeLists.txt b/src/tests/libxrpl/CMakeLists.txt index fbd1f071b8..6481cc73a0 100644 --- a/src/tests/libxrpl/CMakeLists.txt +++ b/src/tests/libxrpl/CMakeLists.txt @@ -67,9 +67,15 @@ endif() # The telemetry test module exercises SpanGuard/Telemetry, which link against # the OpenTelemetry SDK when the telemetry build option is enabled. if(telemetry) + # The umbrella opentelemetry-cpp target does NOT include the in-memory + # exporter in its link set, so link that component explicitly: the + # SpanGuardScope tests drive an InMemorySpanExporter to read exported + # spans. Test-only -- production code never uses this exporter. target_link_libraries( xrpl_tests - PRIVATE opentelemetry-cpp::opentelemetry-cpp + PRIVATE + opentelemetry-cpp::opentelemetry-cpp + opentelemetry-cpp::exporter_in_memory ) endif()