[OTel] Set prometheus exporter option to populate otel scope

pull/38170/head
Yash Tibrewal 1 week ago
parent d61d88d130
commit 8ea4ed82ed
  1. 1
      examples/cpp/csm/csm_greeter_client.cc
  2. 1
      examples/cpp/csm/csm_greeter_server.cc
  3. 1
      examples/cpp/csm/observability/csm_greeter_client.cc
  4. 1
      examples/cpp/csm/observability/csm_greeter_server.cc
  5. 1
      examples/cpp/otel/greeter_callback_client.cc
  6. 1
      examples/cpp/otel/greeter_callback_server.cc
  7. 1
      test/cpp/interop/xds_interop_client.cc
  8. 1
      test/cpp/interop/xds_interop_server.cc

@ -161,6 +161,7 @@ absl::StatusOr<grpc::CsmObservability> InitializeObservability() {
opentelemetry::exporter::metrics::PrometheusExporterOptions opts;
// default was "localhost:9464" which causes connection issue across GKE pods
opts.url = "0.0.0.0:9464";
opts.without_otel_scope = false;
auto prometheus_exporter =
opentelemetry::exporter::metrics::PrometheusExporterFactory::Create(opts);
auto meter_provider =

@ -103,6 +103,7 @@ int main(int argc, char** argv) {
opentelemetry::exporter::metrics::PrometheusExporterOptions opts;
// default was "localhost:9464" which causes connection issue across GKE pods
opts.url = "0.0.0.0:9464";
opts.without_otel_scope = false;
auto prometheus_exporter =
opentelemetry::exporter::metrics::PrometheusExporterFactory::Create(opts);
auto meter_provider =

@ -45,6 +45,7 @@ absl::StatusOr<grpc::CsmObservability> InitializeObservability() {
opentelemetry::exporter::metrics::PrometheusExporterOptions opts;
// default was "localhost:9464" which causes connection issue across GKE pods
opts.url = "0.0.0.0:9464";
opts.without_otel_scope = false;
auto prometheus_exporter =
opentelemetry::exporter::metrics::PrometheusExporterFactory::Create(opts);
auto meter_provider =

@ -50,6 +50,7 @@ int main(int argc, char** argv) {
opentelemetry::exporter::metrics::PrometheusExporterOptions opts;
// default was "localhost:9464" which causes connection issue across GKE pods
opts.url = "0.0.0.0:9464";
opts.without_otel_scope = false;
auto prometheus_exporter =
opentelemetry::exporter::metrics::PrometheusExporterFactory::Create(opts);
auto meter_provider =

@ -49,6 +49,7 @@ int main(int argc, char** argv) {
// exporter.
opentelemetry::exporter::metrics::PrometheusExporterOptions opts;
opts.url = absl::GetFlag(FLAGS_prometheus_endpoint);
opts.without_otel_scope = false;
auto prometheus_exporter =
opentelemetry::exporter::metrics::PrometheusExporterFactory::Create(opts);
auto meter_provider =

@ -52,6 +52,7 @@ int main(int argc, char** argv) {
// exporter.
opentelemetry::exporter::metrics::PrometheusExporterOptions opts;
opts.url = absl::GetFlag(FLAGS_prometheus_endpoint);
opts.without_otel_scope = false;
auto prometheus_exporter =
opentelemetry::exporter::metrics::PrometheusExporterFactory::Create(opts);
auto meter_provider =

@ -430,6 +430,7 @@ grpc::CsmObservability EnableCsmObservability() {
// default was "localhost:9464" which causes connection issue across GKE
// pods
opts.url = "0.0.0.0:9464";
opts.without_otel_scope = false;
auto prometheus_exporter =
opentelemetry::exporter::metrics::PrometheusExporterFactory::Create(opts);
auto meter_provider =

@ -49,6 +49,7 @@ grpc::CsmObservability EnableCsmObservability() {
// default was "localhost:9464" which causes connection issue across GKE
// pods
opts.url = "0.0.0.0:9464";
opts.without_otel_scope = false;
auto prometheus_exporter =
opentelemetry::exporter::metrics::PrometheusExporterFactory::Create(opts);
auto meter_provider =

Loading…
Cancel
Save