diff --git a/src/libxrpl/telemetry/SpanGuard.cpp b/src/libxrpl/telemetry/SpanGuard.cpp index fee94ec8cb..cf434e2e1a 100644 --- a/src/libxrpl/telemetry/SpanGuard.cpp +++ b/src/libxrpl/telemetry/SpanGuard.cpp @@ -299,39 +299,6 @@ SpanGuard::hashSpan( return SpanGuard(std::make_unique(tel->startSpan(std::string(name), parentCtx))); } -// ===== Hash-derived span (generic, category-gated) ========================= - -SpanGuard -SpanGuard::hashSpan( - TraceCategory cat, - std::string_view name, - std::uint8_t const* hashData, - std::size_t hashSize) -{ - if (hashSize < 16) - return {}; - auto* tel = Telemetry::getInstance(); - if (!tel || !tel->isEnabled() || !isCategoryEnabled(*tel, cat)) - return {}; - - otel_trace::TraceId traceId(opentelemetry::nostd::span(hashData, 16)); - - auto const rval = default_prng()(); - std::uint8_t spanIdBytes[8]; - std::memcpy(spanIdBytes, &rval, sizeof(spanIdBytes)); - otel_trace::SpanId spanId(opentelemetry::nostd::span(spanIdBytes, 8)); - - otel_trace::SpanContext syntheticCtx( - traceId, spanId, otel_trace::TraceFlags(1), /* remote = */ false); - - auto parentCtx = opentelemetry::context::Context{}.SetValue( - otel_trace::kSpanKey, - opentelemetry::nostd::shared_ptr( - new otel_trace::DefaultSpan(syntheticCtx))); - - return SpanGuard(std::make_unique(tel->startSpan(std::string(name), parentCtx))); -} - // ===== Context capture ===================================================== SpanContext