blob: b49eb922a1c61e2ee1c400aa9a50352b8990d5d2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
#include "opentelemetry/sdk/common/disabled.h"
#include "opentelemetry/sdk/common/env_variables.h"
#include "opentelemetry/version.h"
OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace common
{
bool GetSdkDisabled()
{
constexpr char kEnv[] = "OTEL_SDK_DISABLED";
bool value{};
const bool exists = GetBoolEnvironmentVariable(kEnv, value);
if (!exists)
{
value = false;
}
return value;
}
} // namespace common
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE
|