[CSM o11y] Re-experimentalize CSM OTel Plugin Option

pull/35660/head
Yash Tibrewal 10 months ago
parent c4ebfc0ed0
commit 4f114a54d9
  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