Merge branch 'pratik/otel-phase1b-telemetry-infra' into pratik/otel-phase1c-rpc-integration

This commit is contained in:
Pratik Mankawde
2026-05-29 18:52:11 +01:00
3 changed files with 7 additions and 3 deletions

View File

@@ -122,7 +122,7 @@ endif()
# so that SpanGuard factory methods produce real OTel spans.
# When OFF (default), all tracing code compiles to no-ops with zero overhead.
# Enable via: conan install -o telemetry=True, or cmake -Dtelemetry=ON.
option(telemetry "Enable OpenTelemetry tracing" OFF)
option(telemetry "Enable OpenTelemetry tracing" ON)
if(telemetry)
find_package(opentelemetry-cpp CONFIG REQUIRED)
add_compile_definitions(XRPL_ENABLE_TELEMETRY)

View File

@@ -54,7 +54,7 @@ class Xrpl(ConanFile):
"rocksdb": True,
"shared": False,
"static": True,
"telemetry": False,
"telemetry": True,
"tests": False,
"unity": False,
"xrpld": False,

View File

@@ -10,12 +10,16 @@
its own factory that can return the real TelemetryImpl.
*/
#include <xrpl/beast/utility/Journal.h>
#include <xrpl/telemetry/Telemetry.h>
#include <string_view>
#include <memory>
#include <utility>
#ifdef XRPL_ENABLE_TELEMETRY
#include <opentelemetry/trace/noop.h>
#include <string_view>
#endif
namespace xrpl::telemetry {