[CSM o11y] Re-experimentalize CSM OTel Plugin Option (#35660)

We are no longer sure about this API, so re-experimentalizing it.

This PR will be backported to 1.61 as well.

Closes #35660

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35660 from yashykt:ReexperimentalizeCsmPluginOption 4f114a54d9
PiperOrigin-RevId: 601378856
pull/35659/head^2
Yash Tibrewal 10 months ago committed by Copybara-Service
parent 576c37192c
commit 984daf98d7
  1. 3
      include/grpcpp/ext/csm_observability.h
  2. 3
      src/cpp/ext/csm/csm_observability.cc
  3. 2
      test/cpp/ext/csm/csm_observability_test.cc
  4. 2
      test/cpp/interop/xds_interop_client.cc
  5. 2
      test/cpp/interop/xds_interop_server.cc

@ -90,8 +90,6 @@ class CsmObservabilityBuilder {
std::unique_ptr<grpc::internal::OpenTelemetryPluginBuilderImpl> builder_;
};
} // namespace experimental
/// Creates an OpenTelemetryPluginOption that would add additional labels on
/// gRPC metrics to enhance observability for CSM users.
///
@ -102,6 +100,7 @@ class CsmObservabilityBuilder {
/// .BuildAndRegisterGlobal();
std::unique_ptr<OpenTelemetryPluginOption> MakeCsmOpenTelemetryPluginOption();
} // namespace experimental
} // namespace grpc
#endif // GRPCPP_EXT_CSM_OBSERVABILITY_H

@ -141,10 +141,9 @@ absl::StatusOr<CsmObservability> CsmObservabilityBuilder::BuildAndRegister() {
return CsmObservability();
}
} // namespace experimental
std::unique_ptr<OpenTelemetryPluginOption> MakeCsmOpenTelemetryPluginOption() {
return std::make_unique<grpc::internal::CsmOpenTelemetryPluginOption>();
}
} // namespace experimental
} // namespace grpc

@ -65,7 +65,7 @@ TEST(CsmChannelTargetSelectorTest, XdsTargetsWithTDAuthority) {
TEST(CsmPluginOptionTest, Basic) {
OpenTelemetryPluginBuilder()
.AddPluginOption(MakeCsmOpenTelemetryPluginOption())
.AddPluginOption(experimental::MakeCsmOpenTelemetryPluginOption())
.BuildAndRegisterGlobal();
}

@ -404,7 +404,7 @@ void EnableCsmObservability() {
std::make_shared<opentelemetry::sdk::metrics::MeterProvider>();
meter_provider->AddMetricReader(std::move(prometheus_exporter));
grpc::OpenTelemetryPluginBuilder()
.AddPluginOption(grpc::MakeCsmOpenTelemetryPluginOption())
.AddPluginOption(grpc::experimental::MakeCsmOpenTelemetryPluginOption())
.SetMeterProvider(std::move(meter_provider))
.BuildAndRegisterGlobal();
}

@ -55,7 +55,7 @@ void EnableCsmObservability() {
std::make_shared<opentelemetry::sdk::metrics::MeterProvider>();
meter_provider->AddMetricReader(std::move(prometheus_exporter));
grpc::OpenTelemetryPluginBuilder()
.AddPluginOption(grpc::MakeCsmOpenTelemetryPluginOption())
.AddPluginOption(grpc::experimental::MakeCsmOpenTelemetryPluginOption())
.SetMeterProvider(std::move(meter_provider))
.BuildAndRegisterGlobal();
}

Loading…
Cancel
Save