You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(config): generate runtime config from supported metadata (#7916)
Config model:
Build the tracer runtime config from `supported-configurations.json`.
The metadata now defines defaults, aliases, transforms, allowed values,
and internal property mapping. Env vars, stable config, code options,
remote config, and telemetry now go through the same parsing and
normalization path instead of separate logic.
Remote config and fallback:
Normalize remote config into the same local option names before apply.
When a remote value is removed, restore the earlier code value or the
default for that one option, instead of keeping an old remote value.
This also keeps config source tracking correct when remote config
changes over time.
Telemetry:
Report the same normalized config view that the tracer really uses.
Telemetry now keeps the source of each value, sends standard config
names such as `DD_*` and `OTEL_*`, and serializes URLs, arrays,
objects, functions, and rule sets in one consistent format for config
change events and extended heartbeats.
DD and OTEL precedence:
Use one precedence model for Datadog and OpenTelemetry settings.
Datadog config still wins when both are set. Generic
`OTEL_EXPORTER_OTLP_*` endpoint, header, protocol, and timeout values
now fill in logs and metrics config when the specific setting is not
set. `b3` extraction keeps Datadog multi-header behavior when it comes
from `DD_TRACE_PROPAGATION_STYLE`, and keeps single-header behavior
when it comes from `OTEL_PROPAGATORS`.
Config-specific updates:
Parse and validate more individual settings through shared parsers.
This now covers sample rates, propagation styles and behavior,
`OTEL_RESOURCE_ATTRIBUTES`, `DD_TRACE_HEADER_TAGS` spacing,
JSON sampling rules, AppSec blocked template file paths, and
`DD_GRPC_CLIENT_ERROR_STATUSES` / `DD_GRPC_SERVER_ERROR_STATUSES`
range values. Invalid values now warn the same way and fall back more
predictably.
DD_LOG_INJECTION was renamed to DD_LOGS_INJECTION to be consistent
with other platforms. This is an internal only configuration why it
is not a breaking change.
Calculated behavior:
Recalculate derived settings from the remembered source of each value.
This keeps service and tag inference, socket and DogStatsD defaults,
OTEL logs vs log injection, runtime metrics vs
`OTEL_METRICS_EXPORTER=none`, AppSec-driven resource renaming, CI and
serverless toggles, Lambda flush behavior, and agentless tracing
overrides consistent when inputs change.
Runtime consumers:
Move profiling, logging, agent URL selection, session propagation, and
other runtime code to read the resolved config instead of reparsing env
vars. This also keeps proxy startup working when tracing is off but
dynamic instrumentation or AppSec standalone still need runtime hooks,
and makes profiling exporter and profiler settings follow the same
config resolution path.
0 commit comments