[experiments] Remove unused experiment (#34090)

We added this as an exploratory measure for a customer that thought they
were using open census (this turned out to be emphatically false).
Remove it since it's probably not how we ultimately want to do this, and
wait for something better to come along.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
pull/34166/head
Craig Tiller 2 years ago committed by GitHub
parent 6c86e79c95
commit b478add7ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      BUILD
  2. 9
      bazel/experiments.bzl
  3. 24
      src/core/lib/experiments/experiments.cc
  4. 31
      src/core/lib/experiments/experiments.h
  5. 5
      src/core/lib/experiments/experiments.yaml
  6. 2
      src/core/lib/experiments/rollouts.yaml
  7. 11
      src/cpp/ext/filters/census/client_filter.cc
  8. 10
      src/python/grpcio_observability/grpc_observability/client_call_tracer.cc
  9. 19
      test/cpp/ext/filters/census/stats_plugin_end2end_test.cc

@ -2370,7 +2370,6 @@ grpc_cc_library(
"//src/core:channel_stack_type",
"//src/core:context",
"//src/core:error",
"//src/core:experiments",
"//src/core:slice",
"//src/core:slice_buffer",
"//src/core:slice_refcount",

@ -21,9 +21,6 @@ EXPERIMENTS = {
"dbg": {
},
"off": {
"census_test": [
"transport_supplies_client_latency",
],
"core_end2end_test": [
"event_engine_listener",
"promise_based_client_call",
@ -69,9 +66,6 @@ EXPERIMENTS = {
"dbg": {
},
"off": {
"census_test": [
"transport_supplies_client_latency",
],
"core_end2end_test": [
"event_engine_listener",
"promise_based_client_call",
@ -120,9 +114,6 @@ EXPERIMENTS = {
"cancel_ares_query_test": [
"event_engine_dns",
],
"census_test": [
"transport_supplies_client_latency",
],
"core_end2end_test": [
"event_engine_client",
"event_engine_listener",

@ -60,11 +60,6 @@ const char* const description_promise_based_server_call =
"If set, use the new gRPC promise based call code when it's appropriate "
"(ie when all filters in a stack are promise based)";
const char* const additional_constraints_promise_based_server_call = "{}";
const char* const description_transport_supplies_client_latency =
"If set, use the transport represented value for client latency in "
"opencensus";
const char* const additional_constraints_transport_supplies_client_latency =
"{}";
const char* const description_event_engine_listener =
"Use EventEngine listeners instead of iomgr's grpc_tcp_server";
const char* const additional_constraints_event_engine_listener = "{}";
@ -127,9 +122,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_free_large_allocator, false, true},
{"promise_based_server_call", description_promise_based_server_call,
additional_constraints_promise_based_server_call, false, true},
{"transport_supplies_client_latency",
description_transport_supplies_client_latency,
additional_constraints_transport_supplies_client_latency, false, true},
{"event_engine_listener", description_event_engine_listener,
additional_constraints_event_engine_listener, false, true},
{"schedule_cancellation_over_write",
@ -197,11 +189,6 @@ const char* const description_promise_based_server_call =
"If set, use the new gRPC promise based call code when it's appropriate "
"(ie when all filters in a stack are promise based)";
const char* const additional_constraints_promise_based_server_call = "{}";
const char* const description_transport_supplies_client_latency =
"If set, use the transport represented value for client latency in "
"opencensus";
const char* const additional_constraints_transport_supplies_client_latency =
"{}";
const char* const description_event_engine_listener =
"Use EventEngine listeners instead of iomgr's grpc_tcp_server";
const char* const additional_constraints_event_engine_listener = "{}";
@ -264,9 +251,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_free_large_allocator, false, true},
{"promise_based_server_call", description_promise_based_server_call,
additional_constraints_promise_based_server_call, false, true},
{"transport_supplies_client_latency",
description_transport_supplies_client_latency,
additional_constraints_transport_supplies_client_latency, false, true},
{"event_engine_listener", description_event_engine_listener,
additional_constraints_event_engine_listener, false, true},
{"schedule_cancellation_over_write",
@ -334,11 +318,6 @@ const char* const description_promise_based_server_call =
"If set, use the new gRPC promise based call code when it's appropriate "
"(ie when all filters in a stack are promise based)";
const char* const additional_constraints_promise_based_server_call = "{}";
const char* const description_transport_supplies_client_latency =
"If set, use the transport represented value for client latency in "
"opencensus";
const char* const additional_constraints_transport_supplies_client_latency =
"{}";
const char* const description_event_engine_listener =
"Use EventEngine listeners instead of iomgr's grpc_tcp_server";
const char* const additional_constraints_event_engine_listener = "{}";
@ -401,9 +380,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_free_large_allocator, false, true},
{"promise_based_server_call", description_promise_based_server_call,
additional_constraints_promise_based_server_call, false, true},
{"transport_supplies_client_latency",
description_transport_supplies_client_latency,
additional_constraints_transport_supplies_client_latency, false, true},
{"event_engine_listener", description_event_engine_listener,
additional_constraints_event_engine_listener, false, true},
{"schedule_cancellation_over_write",

@ -70,7 +70,6 @@ inline bool IsMonitoringExperimentEnabled() { return true; }
inline bool IsPromiseBasedClientCallEnabled() { return false; }
inline bool IsFreeLargeAllocatorEnabled() { return false; }
inline bool IsPromiseBasedServerCallEnabled() { return false; }
inline bool IsTransportSuppliesClientLatencyEnabled() { return false; }
inline bool IsEventEngineListenerEnabled() { return false; }
inline bool IsScheduleCancellationOverWriteEnabled() { return false; }
inline bool IsTraceRecordCallopsEnabled() { return false; }
@ -97,7 +96,6 @@ inline bool IsMonitoringExperimentEnabled() { return true; }
inline bool IsPromiseBasedClientCallEnabled() { return false; }
inline bool IsFreeLargeAllocatorEnabled() { return false; }
inline bool IsPromiseBasedServerCallEnabled() { return false; }
inline bool IsTransportSuppliesClientLatencyEnabled() { return false; }
inline bool IsEventEngineListenerEnabled() { return false; }
inline bool IsScheduleCancellationOverWriteEnabled() { return false; }
inline bool IsTraceRecordCallopsEnabled() { return false; }
@ -124,7 +122,6 @@ inline bool IsMonitoringExperimentEnabled() { return true; }
inline bool IsPromiseBasedClientCallEnabled() { return false; }
inline bool IsFreeLargeAllocatorEnabled() { return false; }
inline bool IsPromiseBasedServerCallEnabled() { return false; }
inline bool IsTransportSuppliesClientLatencyEnabled() { return false; }
inline bool IsEventEngineListenerEnabled() { return false; }
inline bool IsScheduleCancellationOverWriteEnabled() { return false; }
inline bool IsTraceRecordCallopsEnabled() { return false; }
@ -165,36 +162,32 @@ inline bool IsPromiseBasedClientCallEnabled() { return IsExperimentEnabled(7); }
inline bool IsFreeLargeAllocatorEnabled() { return IsExperimentEnabled(8); }
#define GRPC_EXPERIMENT_IS_INCLUDED_PROMISE_BASED_SERVER_CALL
inline bool IsPromiseBasedServerCallEnabled() { return IsExperimentEnabled(9); }
#define GRPC_EXPERIMENT_IS_INCLUDED_TRANSPORT_SUPPLIES_CLIENT_LATENCY
inline bool IsTransportSuppliesClientLatencyEnabled() {
return IsExperimentEnabled(10);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_LISTENER
inline bool IsEventEngineListenerEnabled() { return IsExperimentEnabled(11); }
inline bool IsEventEngineListenerEnabled() { return IsExperimentEnabled(10); }
#define GRPC_EXPERIMENT_IS_INCLUDED_SCHEDULE_CANCELLATION_OVER_WRITE
inline bool IsScheduleCancellationOverWriteEnabled() {
return IsExperimentEnabled(12);
return IsExperimentEnabled(11);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_TRACE_RECORD_CALLOPS
inline bool IsTraceRecordCallopsEnabled() { return IsExperimentEnabled(13); }
inline bool IsTraceRecordCallopsEnabled() { return IsExperimentEnabled(12); }
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_DNS
inline bool IsEventEngineDnsEnabled() { return IsExperimentEnabled(14); }
inline bool IsEventEngineDnsEnabled() { return IsExperimentEnabled(13); }
#define GRPC_EXPERIMENT_IS_INCLUDED_WORK_STEALING
inline bool IsWorkStealingEnabled() { return IsExperimentEnabled(15); }
inline bool IsWorkStealingEnabled() { return IsExperimentEnabled(14); }
#define GRPC_EXPERIMENT_IS_INCLUDED_CLIENT_PRIVACY
inline bool IsClientPrivacyEnabled() { return IsExperimentEnabled(16); }
inline bool IsClientPrivacyEnabled() { return IsExperimentEnabled(15); }
#define GRPC_EXPERIMENT_IS_INCLUDED_CANARY_CLIENT_PRIVACY
inline bool IsCanaryClientPrivacyEnabled() { return IsExperimentEnabled(17); }
inline bool IsCanaryClientPrivacyEnabled() { return IsExperimentEnabled(16); }
#define GRPC_EXPERIMENT_IS_INCLUDED_SERVER_PRIVACY
inline bool IsServerPrivacyEnabled() { return IsExperimentEnabled(18); }
inline bool IsServerPrivacyEnabled() { return IsExperimentEnabled(17); }
#define GRPC_EXPERIMENT_IS_INCLUDED_UNIQUE_METADATA_STRINGS
inline bool IsUniqueMetadataStringsEnabled() { return IsExperimentEnabled(19); }
inline bool IsUniqueMetadataStringsEnabled() { return IsExperimentEnabled(18); }
#define GRPC_EXPERIMENT_IS_INCLUDED_KEEPALIVE_FIX
inline bool IsKeepaliveFixEnabled() { return IsExperimentEnabled(20); }
inline bool IsKeepaliveFixEnabled() { return IsExperimentEnabled(19); }
#define GRPC_EXPERIMENT_IS_INCLUDED_KEEPALIVE_SERVER_FIX
inline bool IsKeepaliveServerFixEnabled() { return IsExperimentEnabled(21); }
inline bool IsKeepaliveServerFixEnabled() { return IsExperimentEnabled(20); }
constexpr const size_t kNumExperiments = 22;
constexpr const size_t kNumExperiments = 21;
extern const ExperimentMetadata g_experiment_metadata[kNumExperiments];
#endif

@ -94,11 +94,6 @@
expiry: 2023/11/01
owner: ctiller@google.com
test_tags: ["core_end2end_test", "cpp_end2end_test", "xds_end2end_test", "logging_test"]
- name: transport_supplies_client_latency
description: If set, use the transport represented value for client latency in opencensus
expiry: 2023/09/01
owner: ctiller@google.com
test_tags: [census_test]
- name: event_engine_listener
description: Use EventEngine listeners instead of iomgr's grpc_tcp_server
expiry: 2024/01/01

@ -62,8 +62,6 @@
default: false
- name: promise_based_server_call
default: false
- name: transport_supplies_client_latency
default: false
- name: event_engine_listener
default: false
- name: schedule_cancellation_over_write

@ -55,7 +55,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/channel/context.h"
#include "src/core/lib/experiments/experiments.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/promise/context.h"
#include "src/core/lib/resource_quota/arena.h"
@ -235,16 +234,6 @@ void OpenCensusCallTracer::OpenCensusCallAttemptTracer::
{RpcClientRoundtripLatency(),
absl::ToDoubleMilliseconds(absl::Now() - start_time_)}},
tags);
if (grpc_core::IsTransportSuppliesClientLatencyEnabled()) {
if (transport_stream_stats != nullptr &&
gpr_time_cmp(transport_stream_stats->latency,
gpr_inf_future(GPR_TIMESPAN)) != 0) {
double latency_ms = absl::ToDoubleMilliseconds(absl::Microseconds(
gpr_timespec_to_micros(transport_stream_stats->latency)));
::opencensus::stats::Record({{RpcClientTransportLatency(), latency_ms}},
tags);
}
}
}
}

@ -246,16 +246,6 @@ void PythonOpenCensusCallTracer::PythonOpenCensusCallAttemptTracer::
absl::ToDoubleMilliseconds(absl::Now() - start_time_),
context_.Labels());
RecordIntMetric(kRpcClientCompletedRpcMeasureName, 1, context_.Labels());
if (grpc_core::IsTransportSuppliesClientLatencyEnabled()) {
if (transport_stream_stats != nullptr &&
gpr_time_cmp(transport_stream_stats->latency,
gpr_inf_future(GPR_TIMESPAN)) != 0) {
double latency_ms = absl::ToDoubleMilliseconds(absl::Microseconds(
gpr_timespec_to_micros(transport_stream_stats->latency)));
RecordDoubleMetric(kRpcClientTransportLatencyMeasureName, latency_ms,
context_.Labels());
}
}
}
void PythonOpenCensusCallTracer::PythonOpenCensusCallAttemptTracer::

@ -261,25 +261,6 @@ TEST_F(StatsPluginEnd2EndTest, Latency) {
::testing::Property(&Distribution::mean,
::testing::Lt(client_latency))))));
// Transport time is a subinterval of total latency.
if (grpc_core::IsTransportSuppliesClientLatencyEnabled()) {
const auto client_transport_latency =
client_transport_latency_view.GetData()
.distribution_data()
.find({client_method_name_})
->second.mean();
EXPECT_THAT(
client_server_latency_view.GetData().distribution_data(),
::testing::UnorderedElementsAre(::testing::Pair(
::testing::ElementsAre(client_method_name_),
::testing::AllOf(
::testing::Property(&Distribution::count, 1),
::testing::Property(&Distribution::mean, ::testing::Gt(0.0)),
::testing::Property(
&Distribution::mean,
::testing::Lt(client_transport_latency))))));
}
// client api latency should be less than max time but greater than client
// roundtrip (attempt) latency view.
EXPECT_THAT(

Loading…
Cancel
Save