Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map OpenTelemetry environment variables to their Datadog equivalents #7184

Merged
merged 3 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,9 @@ private static void configureLogger() {
logLevel = "DEBUG";
} else {
logLevel = ddGetProperty("dd.log.level");
if (null == logLevel) {
logLevel = System.getenv("OTEL_LOG_LEVEL");
}
}

if (null == logLevel && !isFeatureEnabled(AgentFeature.STARTUP_LOGS)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public final class ConfigDefaults {

static final boolean DEFAULT_SPAN_ORIGIN_ENABLED = false;
static final boolean DEFAULT_TRACE_ENABLED = true;
static final boolean DEFAULT_TRACE_OTEL_ENABLED = false;
public static final boolean DEFAULT_TRACE_OTEL_ENABLED = false;
static final boolean DEFAULT_INTEGRATIONS_ENABLED = true;

static final boolean DEFAULT_RUNTIME_CONTEXT_FIELD_INJECTION = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,14 @@ public static ConfigProvider createDefault() {
return new ConfigProvider(
new SystemPropertiesConfigSource(),
new EnvironmentConfigSource(),
new OtelEnvironmentConfigSource(),
new CapturedEnvironmentConfigSource());
} else {
return new ConfigProvider(
new SystemPropertiesConfigSource(),
new EnvironmentConfigSource(),
new PropertiesConfigSource(configProperties, true),
new OtelEnvironmentConfigSource(),
new CapturedEnvironmentConfigSource());
}
}
Expand All @@ -377,13 +379,15 @@ public static ConfigProvider withoutCollector() {
false,
new SystemPropertiesConfigSource(),
new EnvironmentConfigSource(),
new OtelEnvironmentConfigSource(),
new CapturedEnvironmentConfigSource());
} else {
return new ConfigProvider(
false,
new SystemPropertiesConfigSource(),
new EnvironmentConfigSource(),
new PropertiesConfigSource(configProperties, true),
new OtelEnvironmentConfigSource(),
new CapturedEnvironmentConfigSource());
}
}
Expand All @@ -401,13 +405,15 @@ public static ConfigProvider withPropertiesOverride(Properties properties) {
new SystemPropertiesConfigSource(),
new EnvironmentConfigSource(),
providedConfigSource,
new OtelEnvironmentConfigSource(),
new CapturedEnvironmentConfigSource());
} else {
return new ConfigProvider(
providedConfigSource,
new SystemPropertiesConfigSource(),
new EnvironmentConfigSource(),
new PropertiesConfigSource(configProperties, true),
new OtelEnvironmentConfigSource(),
new CapturedEnvironmentConfigSource());
}
}
Expand Down
Loading
Loading