From d0b712f2af34896d8e6d736f3447144865303a0f Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Fri, 15 Dec 2023 13:27:48 -0700 Subject: [PATCH] Prefix Prometheus environment variables with OTEL_CPP --- exporters/prometheus/src/exporter_options.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/exporters/prometheus/src/exporter_options.cc b/exporters/prometheus/src/exporter_options.cc index 5d6b17318a..0a7814c166 100644 --- a/exporters/prometheus/src/exporter_options.cc +++ b/exporters/prometheus/src/exporter_options.cc @@ -27,7 +27,8 @@ inline const std::string GetPrometheusDefaultHttpEndpoint() inline bool GetPrometheusPopulateOtelScope() { - constexpr char kPrometheusPopulateOtelScope[] = "PROMETHEUS_EXPORTER_POPULATE_OTEL_SCOPE"; + constexpr char kPrometheusPopulateOtelScope[] = + "OTEL_CPP_PROMETHEUS_EXPORTER_POPULATE_OTEL_SCOPE"; bool setting; auto exists = @@ -38,7 +39,8 @@ inline bool GetPrometheusPopulateOtelScope() inline bool GetPrometheusPopulateTargetInfo() { - constexpr char kPrometheusPopulateTargetInfo[] = "PROMETHEUS_EXPORTER_POPULATE_TARGET_INFO"; + constexpr char kPrometheusPopulateTargetInfo[] = + "OTEL_CPP_PROMETHEUS_EXPORTER_POPULATE_TARGET_INFO"; bool setting; auto exists = opentelemetry::sdk::common::GetBoolEnvironmentVariable(