mirror of
https://github.com/Tencent/flare.git
synced 2026-10-18 21:51:00 +08:00
92a08ae18b
* tracing: migrate opentracing-cpp -> opentelemetry-cpp (API only) 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> * ci: bazelignore thirdparty/opentelemetry-cpp (blade BUILD) The repo-wide `bazel build ...` job parses every BUILD file; the blade thin wrapper thirdparty/opentelemetry-cpp/BUILD uses blade-only syntax (vcpkg#...:lib, visibility='PUBLIC'). Add it to .bazelignore (the opentracing entry was removed but its replacement wasn't added). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * tracing: clang-format (v15) the migrated files Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore: drop accidentally-committed .claude/ tooling files Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * doc(tracing): note provider ABI contract for OpenTelemetry nostd types The TracingOpsProvider interface uses OpenTelemetry API types (nostd::shared_ptr<Span>, nostd::string_view, AttributeValue) directly. The nostd:: backing is a compile-time choice (bundled / std via OPENTELEMETRY_STL_VERSION / abseil) and the three are mutually incompatible types, so a provider must be built with the same OpenTelemetry configuration as flare. flare leaves the default nostd in place. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore: gitignore .claude/ (Claude Code local tooling) Prevents accidentally re-committing .claude/settings*.json (cf. review comments on PR #201). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * tracing: address PR #201 review follow-ups (non-blocking) - forcibly_sampled now routes `flare.sampling_priority` through the provider's `SetFrameworkTag` translation (before `IsSampled`) instead of a raw `SetAttribute`, keeping the `flare.`-prefixed tag consistent with every other framework tag and letting providers honor the force-sample signal. Add `ext::kSamplingPriority`. - An empty log key (single-arg `AddTracingLog`) now materializes as the default event name "log" so backends that group/display by event name don't render a blank one; document the per-log-event mapping. - Guard `QuickerValue`'s reliance on P0608R3 (C++20) with a static_assert so a future standard downgrade can't silently bind `const char*` to bool. - Reset `DummySpan`'s inline-static tags/logs at the start of the recording test so assertions can't observe leftovers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
28 lines
2.0 KiB
Plaintext
28 lines
2.0 KiB
Plaintext
thirdparty/protobuf/bin/plugin/grpc/grpc_cpp_plugin filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/gperftools/gperftools-2.8.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/jemalloc/jemalloc-5.2.1.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/blade/Python-2.7.3.tgz filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/lz4/lz4-1.9.3.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/snappy/snappy-1.1.8.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/nghttp2/nghttp2-1.41.0.tar.bz2 filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/protobuf/bin/x86_64/protoc-3.4.1 filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/protobuf/bin/aarch64/protoc-3.4.1 filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/zlib/zlib-1.3.2.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/benchmark/benchmark-1.5.3.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/jsoncpp/jsoncpp-0.10.7.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/googletest/googletest-release-1.10.0.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/protobuf/bin/plugin/grpc/java_plugin filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/ctemplate/ctemplate-ctemplate-2.4.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/curl/curl-7.71.0.tar.bz2 filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/protobuf/bin/plugin/protoc-gen-go filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/protobuf/bin/x86_64/protoc-2.5.0 filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/gflags/gflags-2.2.2.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/fmt/fmt-7.1.3.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/glog/glog-0.7.1.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/protobuf/bin/ppc64le/protoc-3.4.1 filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/blade/cmake-3.31.6-linux-x86_64.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/yaml-cpp/yaml-cpp-yaml-cpp-0.6.3.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/blade/blade.zip filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/openssl/openssl-1.0.2u.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
thirdparty/zstd/zstd-1.4.5.tar.gz filter=lfs diff=lfs merge=lfs -text
|