opentracing-cpp is deprecated/superseded by OpenTelemetry. flare ships no real
tracer -- it exposes a pluggable abstraction (TracingOpsProvider / QuickerSpan /
TracingOps) over the tracing-API types, with providers plugged in by users.
Re-base that abstraction on the opentelemetry-cpp **API** (header-only, v1.27.0)
and drop opentracing-cpp from both build systems.
Scope: API only -- no SDK/exporter, so no protobuf/grpc is pulled in and the
deliberately-pinned (abseil-free) protobuf 3.21.12 stays intact. The
abstraction and the opaque `bytes tracing_context` wire format are kept; only
the types/bodies change.
Source (flare/rpc/tracing/):
- tracing_ops_provider.h: re-typed virtuals; new flare-owned SpanStartOptions
(parent SpanContext + SpanKind + timestamps + start attrs) replacing
opentracing::StartSpanOptions/ChildOf. Extract -> std::optional<SpanContext>.
- tracing_ops.h/.cc: span_ is nostd::shared_ptr<trace::Span>; SetAttribute/
AddEvent/End; SpanContext is a value type; buffered ops keep flare's owning
variant and convert to (non-owning) AttributeValue only at flush.
- framework_tags.h -> constexpr std::string_view; string_view_interop.h ->
ToStd/ToOtel (nostd<->std). Standard-tag table is a literal allowlist;
span.kind moves from a tag to SpanStartOptions::kind.
- Call sites rpc_channel.cc / normal_connection_handler.cc updated; rpc_meta.proto
comment updated (wire field unchanged).
- Tests/benchmark rewritten onto a recording fake otel::trace::Span (OTel's noop
span can't be asserted on); integration test asserts span kind via the
provider-recorded "span.kind" instead of an opentracing tag.
Build:
- blade: BLADE_ROOT vcpkg_config gains opentelemetry-cpp; thin wrapper
//thirdparty/opentelemetry-cpp:api (refs opentelemetry_common -- the api
component is header-only with no .a; that lib's include dir carries the api +
absl headers). opentracing thirdparty dir removed.
- bazel: deps.bzl http_archive for opentelemetry-cpp 1.27.0 + api-only
bazel/opentelemetry-cpp.BUILD (header-only, bundled nostd -> no abseil);
patch_cmds drop the archive's nested BUILDs so the api headers can be globbed.
opentracing BUILD/patch + .bazelignore/.gitattributes entries removed.
Verified: blade and bazel both build //flare/rpc/tracing/... and pass
tracing_ops_test + integration_test.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
opentracing-cpp is deprecated and superseded by OpenTelemetry. flare ships no real tracer — it exposes a pluggable abstraction (
TracingOpsProvider/QuickerSpan/TracingOps) over the tracing-API types, with concrete providers plugged in by users. This re-bases that abstraction on the opentelemetry-cpp API (header-only, v1.27.0) and removes opentracing-cpp from both build systems.Scope / key decisions
rpc_meta.proto'sbytes tracing_contextstays an opaque, provider-serialized blob (no W3C text-map propagators).Source (
flare/rpc/tracing/)tracing_ops_provider.h: virtuals re-typed to OTel; new flare-ownedSpanStartOptions(parentSpanContext+SpanKind+ timestamps + start attrs) replacesopentracing::StartSpanOptions/ChildOf;Extract→std::optional<SpanContext>.tracing_ops.h/.cc:span_isnostd::shared_ptr<trace::Span>;SetAttribute/AddEvent/End;SpanContextis a value type; buffered ops keep flare's owning variant and convert to the non-owningAttributeValueonly at flush (avoids a use-after-free).framework_tags.h→constexpr std::string_view;string_view_interop.h→ToStd/ToOtel. Standard-tag table is a literal allowlist;span.kindmoves from a tag toSpanStartOptions::kind.rpc_channel.cc/normal_connection_handler.ccupdated.rpc_meta.protofield unchanged (comment updated).otel::trace::Span(OTel's noop span discards everything and can't be asserted on). The integration test asserts span kind via a provider-recordedspan.kindattribute.Build
BLADE_ROOTvcpkg_config gainsopentelemetry-cpp(default features → no exporters); thin wrapper//thirdparty/opentelemetry-cpp:api. Theopentelemetry_apicomponent is header-only (no.a), so the wrapper referencesopentelemetry_commonfor the include dir (which carries both the otel + absl headers); flare still consumes only API headers. Vendoredthirdparty/opentracing-cpp/removed.deps.bzlhttp_archivefor opentelemetry-cpp 1.27.0 + api-onlybazel/opentelemetry-cpp.BUILD(header-only; bundlednostd→ no abseil needed).patch_cmdsdrop the archive's nestedBUILDfiles so the api headers can be globbed from one package. opentracingBUILD/patch +.bazelignore/.gitattributesentries removed.Verification
Both build systems build
//flare/rpc/tracing/...and passtracing_ops_test+integration_test(full RPC flow: client/server spans, context propagation through the bytes field, framework-tag translation, logs).🤖 Generated with Claude Code