Skip to content

Commit 74abeb8

Browse files
committed
Revert "[OTel C++] Add tracing support (#38437)"
This reverts commit a6eb776.
1 parent dc4052f commit 74abeb8

19 files changed

+239
-2056
lines changed

CMakeLists.txt

Lines changed: 0 additions & 181 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build_autogenerated.yaml

Lines changed: 0 additions & 80 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

include/grpcpp/ext/otel_plugin.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
3232
#include "absl/status/status.h"
3333
#include "absl/status/statusor.h"
3434
#include "absl/strings/string_view.h"
35-
#include "opentelemetry/context/propagation/text_map_propagator.h"
3635
#include "opentelemetry/metrics/meter_provider.h"
37-
#include "opentelemetry/trace/tracer_provider.h"
3836

3937
namespace grpc {
4038
namespace internal {
@@ -151,21 +149,6 @@ class OpenTelemetryPluginBuilder {
151149
/// Records \a optional_label_key on all metrics that provide it.
152150
OpenTelemetryPluginBuilder& AddOptionalLabel(
153151
absl::string_view optional_label_key);
154-
/// EXPERIMENTAL API
155-
/// If `SetTracerProvider()` is not called, no traces are collected.
156-
OpenTelemetryPluginBuilder& SetTracerProvider(
157-
std::shared_ptr<opentelemetry::trace::TracerProvider> tracer_provider);
158-
/// EXPERIMENTAL API
159-
/// Set one or multiple text map propagators for span context propagation,
160-
/// e.g. the community standard ones like W3C, etc.
161-
OpenTelemetryPluginBuilder& SetTextMapPropagator(
162-
std::unique_ptr<opentelemetry::context::propagation::TextMapPropagator>
163-
text_map_propagator);
164-
/// EXPERIMENTAL API
165-
/// Returns a TextMapPropagator that uses gRPC's "grpc-trace-bin" metadata to
166-
/// propagate span contexts.
167-
static std::unique_ptr<opentelemetry::context::propagation::TextMapPropagator>
168-
MakeGrpcTraceBinTextMapPropagator();
169152
/// Set scope filter to choose which channels are recorded by this plugin.
170153
/// Server-side recording remains unaffected.
171154
OpenTelemetryPluginBuilder& SetChannelScopeFilter(

src/core/lib/surface/filter_stack_call.cc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ grpc_error_handle FilterStackCall::Create(grpc_call_create_args* args,
114114
*out_call = call->c_ptr();
115115
grpc_slice path = grpc_empty_slice();
116116
ScopedContext ctx(call);
117-
Call* parent = Call::FromC(args->parent);
118117
if (call->is_client()) {
119118
call->final_op_.client.status_details = nullptr;
120119
call->final_op_.client.status = nullptr;
@@ -130,12 +129,6 @@ grpc_error_handle FilterStackCall::Create(grpc_call_create_args* args,
130129
call->send_initial_metadata_.Set(
131130
GrpcRegisteredMethod(), reinterpret_cast<void*>(static_cast<uintptr_t>(
132131
args->registered_method)));
133-
if (parent != nullptr) {
134-
add_init_error(&error, absl_status_to_grpc_error(call->InitParent(
135-
parent, args->propagation_mask)));
136-
}
137-
// Client call tracers should be created after propagating relevant
138-
// properties (tracing included) from the parent.
139132
channel_stack->stats_plugin_group->AddClientCallTracers(
140133
Slice(CSliceRef(path)), args->registered_method, arena.get());
141134
} else {
@@ -167,6 +160,11 @@ grpc_error_handle FilterStackCall::Create(grpc_call_create_args* args,
167160
channel_stack->stats_plugin_group->AddServerCallTracers(arena.get());
168161
}
169162

163+
Call* parent = Call::FromC(args->parent);
164+
if (parent != nullptr) {
165+
add_init_error(&error, absl_status_to_grpc_error(call->InitParent(
166+
parent, args->propagation_mask)));
167+
}
170168
// initial refcount dropped by grpc_call_unref
171169
grpc_call_element_args call_args = {
172170
call->call_stack(), args->server_transport_data, path,

0 commit comments

Comments
 (0)