Skip to content

Commit

Permalink
I forgot to run format.
Browse files Browse the repository at this point in the history
  • Loading branch information
willie committed Mar 5, 2024
1 parent 00be6ee commit bf3363c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sdk/src/resource/resource_detector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ namespace resource
{

const char *OTEL_RESOURCE_ATTRIBUTES = "OTEL_RESOURCE_ATTRIBUTES";
const char *OTEL_SERVICE_NAME = "OTEL_SERVICE_NAME";
const char *OTEL_SERVICE_NAME = "OTEL_SERVICE_NAME";

Resource OTELResourceDetector::Detect() noexcept
{
std::string attributes_str, service_name;

bool attributes_exists = opentelemetry::sdk::common::GetStringEnvironmentVariable(OTEL_RESOURCE_ATTRIBUTES, attributes_str);
bool service_name_exists = opentelemetry::sdk::common::GetStringEnvironmentVariable(OTEL_SERVICE_NAME, service_name);
bool attributes_exists = opentelemetry::sdk::common::GetStringEnvironmentVariable(
OTEL_RESOURCE_ATTRIBUTES, attributes_str);
bool service_name_exists =
opentelemetry::sdk::common::GetStringEnvironmentVariable(OTEL_SERVICE_NAME, service_name);

if (!attributes_exists && !service_name_exists)
{
Expand Down

0 comments on commit bf3363c

Please sign in to comment.