Support declarative configuration via OTEL_CONFIG_FILE - #9
Draft
mmanciop wants to merge 1 commit into
Draft
Conversation
mmanciop
force-pushed
the
declarative-config-support
branch
from
July 21, 2026 15:00
9d3a83a to
c6481ea
Compare
The pinned SDK bundles the OTEL_CONFIG_FILE loader behind the opentelemetry-sdk[file-configuration] extra (pyyaml, jsonschema), which a plain install of the distribution does not pull in. Setting OTEL_CONFIG_FILE then failed with a raw traceback at startup and the process ran without any telemetry. Add a declarative-config extra so the loader's dependencies install with the distribution, and a preflight in Dash0Configurator that, when OTEL_CONFIG_FILE is set but the loader cannot be imported, logs one actionable error naming the package to install instead of half-failing into silence. Validated end-to-end: with the extra installed, the SDK is built from the declarative YAML (exporter endpoint and resource from the file) and the distro's bootstrap span exports through the file-configured pipeline; without it, the single error message replaces the traceback and the application keeps running. Fixes #5 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mmanciop
force-pushed
the
declarative-config-support
branch
from
July 21, 2026 16:51
c6481ea to
6457acb
Compare
mmanciop
marked this pull request as draft
July 21, 2026 16:54
Member
Author
|
Putting this on the backburner because we do not use declarative config in the Dash0 Operator right now, and it would bring the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes the distribution work with OpenTelemetry declarative (file-based) configuration:
declarative-configextra:pip install dash0-opentelemetry-distro[declarative-config]installs the loader dependencies (opentelemetry-sdk[file-configuration], i.e. pyyaml + jsonschema). It stays an extra rather than a hard dependency because jsonschema drags inrpds-py(native wheels), which would break the distro's "no native dependencies, safe to inject" design goal.Preflight in
Dash0Configurator: whenOTEL_CONFIG_FILEis set but the loader can't be imported, log one actionable error and skip SDK configuration:Previously this failed with a raw
ModuleNotFoundErrortraceback at startup, and the process silently ran without any telemetry.The preflight checks only where the pinned SDK (1.43.0, from #8) keeps the loader; its docstring and the extra's comment flag that the 1.44 bump moves the loader to the separate
opentelemetry-configurationpackage, so the future version-bump change knows to revisit both.Validation
Verified end-to-end with
opentelemetry-instrumentagainst a local OTLP sink:DASH0_BOOTSTRAP_SPAN) export to the endpoint from the file, with the file's resource attributes; the vendored pyproto OTLP/HTTP exporter is picked up by the declarativeotlp_httpfactory.OTEL_CONFIG_FILE, and the preflight's message shape. Full suite: 32 passed via the CI command; ruff clean;uv.lockregenerated.Known remaining gap (out of scope, tracked in #6): the distro's detected resource attributes are dropped under declarative configuration.
Fixes #5
🤖 Generated with Claude Code