Skip to content

Commit

Permalink
Prefix Prometheus environment variables with OTEL_CPP
Browse files Browse the repository at this point in the history
  • Loading branch information
timwoj committed Dec 16, 2023
1 parent 0d5fd19 commit d0b712f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions exporters/prometheus/src/exporter_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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(
Expand Down

0 comments on commit d0b712f

Please sign in to comment.