10BC0 constants naming fix · open-telemetry/opentelemetry-cpp@a404c80 · GitHub
[go: up one dir, main page]

Skip to content

Commit a404c80

Browse files
constants naming fix
1 parent 047e35c commit a404c80

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

resource_detectors/container_detector.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ namespace resource
2121
/**
2222
* This is the file path from where we can get container.id
2323
*/
24-
constexpr const char *KCGroupPath = "/proc/self/cgroup";
24+
constexpr const char *kCGroupPath = "/proc/self/cgroup";
2525

2626
Resource ContainerResourceDetector::Detect() noexcept
2727
{
28-
std::string container_id = opentelemetry::sdk::resource::GetContainerIDFromCgroup(KCGroupPath);
28+
std::string container_id = opentelemetry::sdk::resource::GetContainerIDFromCgroup(kCGroupPath);
2929
if (container_id.empty())
3030
{
3131
return ResourceDetector::Create({});

sdk/src/resource/resource_detector.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ namespace sdk
1919
namespace resource
2020
{
2121

22-
constexpr const char *KOtelResourceAttributes = "OTEL_RESOURCE_ATTRIBUTES";
23-
constexpr const char *KOtelServiceName = "OTEL_SERVICE_NAME";
22+
constexpr const char *kOtelResourceAttributes = "OTEL_RESOURCE_ATTRIBUTES";
23+
constexpr const char *kOtelServiceName = "OTEL_SERVICE_NAME";
2424

2525
Resource ResourceDetector::Create(const ResourceAttributes &attributes,
2626
const std::string &schema_url)
@@ -33,9 +33,9 @@ Resource OTELResourceDetector::Detect() noexcept
3333
std::string attributes_str, service_name;
3434

3535
bool attributes_exists = opentelemetry::sdk::common::GetStringEnvironmentVariable(
36-
KOtelResourceAttributes, attributes_str);
36+
kOtelResourceAttributes, attributes_str);
3737
bool service_name_exists =
38-
opentelemetry::sdk::common::GetStringEnvironmentVariable(KOtelServiceName, service_name);
38+
opentelemetry::sdk::common::GetStringEnvironmentVariable(kOtelServiceName, service_name);
3939

4040
if (!attributes_exists && !service_name_exists)
4141
{

0 commit comments

Comments
 (0)
0