What OpenTelemetry declarative configuration changes for SDK rollouts
A platform team that runs dozens of services often configures each OpenTelemetry SDK through environment variables set in deployment manifests, container images and CI templates. Over time the same settings drift apart: one service exports to a different endpoint, another samples at a different rate, and a third has a resource attribute missing. Declarative configuration replaces that scattered set of variables with a single YAML file that describes the SDK's settings, so the file can be versioned, reviewed and copied between services. In practice, the platform team owns one schema-based document and each service receives it, instead of tracking a long list of variables per workload.
The configuration follows a published schema. Its stable parts are versioned as released, while experimental parts carry a /development suffix, so a team can see at a glance which keys may still change. The schema being stable does not mean every SDK reads it yet. Implementation support is still experimental across languages, and the OpenTelemetry documentation lists Java as a supporting SDK. Before you commit a fleet to the format, confirm in the declarative configuration documentation which keys your SDK version honors, and test each /development key you plan to use in a non-production environment first.
Teams should adopt the format when they manage many services with shared exporter, sampling or resource settings, need configuration reviewed through the same change process as other infrastructure, or want one file to describe a rollout across languages. It is not yet worth the change for a small estate with a few services already working on environment variables, or for teams that depend on a key marked experimental in their SDK version. In that case, keep the variables, record the current values in version control, and revisit when your chosen SDKs document full support for the keys you need.
Which configuration approach fits which team
This table compares environment variables, a declarative YAML file and a centrally managed configuration source across auditability, per-service variation, language coverage and rollback. Read each row against your own fleet size and SDK mix, then match the approach to the team that will own it. The main takeaway is that YAML gives reviewable, versioned configuration, but its language support must be confirmed per SDK before you standardize on it.
| Criterion | Environment variables | Declarative YAML file | Central configuration source |
|---|---|---|---|
| Auditability | Values live in deployment manifests or shell profiles, so changes are scattered and hard to review as one set | One file per service or image can be diffed, reviewed and stored in version control | Changes are logged by the management system, but you must confirm what history and approval it keeps |
| Per-service variation | Easy for a few values, but many services with different exporters multiply the variables to maintain | Each service carries its own file, which suits teams that own their settings | Suits many services sharing a baseline with overrides, if the source supports that model |
| Language coverage | Widest coverage, since the environment variable conventions are the long-standing configuration path | Support is still experimental in implementations, and Java is listed as a supporting SDK; confirm each other SDK you run | Depends on the management tool and the SDKs it can push settings to; confirm before planning |
| Rollback | Rolling back means redeploying with old values, which is slow when many variables change together | Reverting the file in version control and redeploying returns the whole configuration in one step | Can change settings without a redeploy, but a bad push can reach many services quickly, so confirm staged rollout |
| Schema stability | Names are stable and widely documented across languages | Stable schema with experimental parts suffixed /development, so pin the schema version you test | Depends on how the source validates against the schema version |
| Best fit | Small estates, mixed SDK languages or teams with working environment variable setups | Teams on supported SDKs that want reviewable, per-service configuration in version control | Large fleets where a platform team sets baselines and needs central control and audit trails |
How to roll out declarative configuration with the Java agent
This sequence moves a Java service from environment variables to one YAML file in a controlled way, proving the exported telemetry is unchanged before any production service switches over. It gives your team a tested file, a comparison record and a rollback path for each service.
Inventory current environment variables
List every OpenTelemetry environment variable set for each Java service, including exporter endpoints, protocols, headers, resource attributes, sampler settings and propagators. Record where each value comes from, such as a Kubernetes manifest, a systemd unit or a CI pipeline. Store the list in version control so the baseline is reviewable. This step is done when every service has a complete, reviewed list and an owner has confirmed that nothing is set through a path the inventory missed.
Confirm Java SDK and agent support
Check the OpenTelemetry declarative configuration documentation, which lists Java as a supporting SDK, and then confirm in the Java agent release notes that the agent version you plan to run reads the declarative file. Note that the schema is stable but implementation support is still experimental, so pin the exact agent version and record which schema keys it honors. Ask your vendor or internal platform team to confirm the same for any custom distribution. This step is done when a pinned agent version and a list of supported keys are written into the rollout ticket.
Write the YAML in a non-production service
Pick one non-production Java service with representative traffic and translate the inventory into a declarative configuration file. Map each environment variable to its schema key and mark any experimental parts that carry the /development suffix so they stay visible in review. Point the agent at the file through the mechanism your agent version documents, and keep the old environment variables in place for the comparison step. This step is done when the service starts with the file loaded and the agent logs confirm which configuration source it used.
Validate exported telemetry against the old setup
Run the same request load through the service under the old and new configurations, or compare two identical deployments side by side. Check that spans, metric names and attributes, log correlation fields, resource attributes, sampling rates and exporter destinations match. Diff the results in your backend, not only the agent startup output. This step is done when the differences are either zero or explained and accepted in writing by the service owner.
Promote one production service at a time
Move services to the file in small batches, starting with the lowest-risk production workload. Keep each change in its own deployment so a regression traces to one service. Repeat the telemetry comparison on each service after its first production deployment, because real traffic can expose attributes or sampling paths that the test load missed. This step is done when each promoted service shows the same telemetry profile as its baseline for a full business cycle chosen by the service owner.
Remove redundant environment variables
After a service has run cleanly on the file, delete the environment variables that the file now sets, so one source of truth remains. Keep any variables the agent still needs for values the file cannot express, and document them next to the YAML. Commit the change with a link to the comparison record. This step is done when the deployment manifest contains no duplicate settings and a configuration review confirms the file is the only place each value is defined.
Keep the rollback path ready
For every promoted service, keep the previous deployment manifest and the environment variable set in version control, and confirm that redeploying it restores the old telemetry profile. Test the rollback once in the non-production service before relying on it, and define who can trigger it and what signal tells them to. Recheck the rollback after each agent upgrade, because the set of supported keys can change between versions. This step is done when a rollback has been exercised in a non-production environment and the runbook names the owner and the trigger.
Security and operational considerations for config files
A declarative configuration file concentrates exporter endpoints, headers and sampling choices in one place, so it becomes a security asset in its own right. The cards below cover where credentials should live, who can read and change the file, and how to keep the same settings from drifting across services.
Keep credentials out of the file
A YAML file that carries exporter headers with tokens or passwords will be copied into repositories, tickets and container images. Reference secrets from your secret store or from environment variables injected at runtime, and check that no literal credential appears in the committed file. Ask your team which mechanism your SDK version resolves and test it in a non-production cluster before rollout. Treat any token that has already been committed as compromised and rotate it.
Restrict file permissions
The config file is read at process start, so anyone who can read it can see where telemetry goes and how it is authenticated. Set owner and group permissions so only the service account reads it, and avoid world-readable mounts in containers. Confirm that the file is mounted read-only where the runtime allows it. Review ownership whenever the service runs under a different user or in a new base image.
Version control hygiene
Keep the configuration in Git so every change has an author, a diff and a revision you can roll back to. Enforce secret scanning on pushes and block merges that introduce high-entropy strings or known token formats. Store environment-specific values such as endpoints in separate overlays rather than duplicating whole files. Document which branch deploys to which environment so a stale branch cannot reach production.
Review changes to telemetry routing
A small edit to an exporter endpoint or sampler can stop traces from reaching the backend without any error in the application. Require a second reviewer for changes to exporters, sampling and resource attributes, since these affect data flow and cost. Run the proposed file against a test backend before merging. Record who approved each change so audit questions can be answered from the repository history.
Prevent drift between services
When each service carries its own copy of the file, endpoints, headers and sampling rates slowly diverge, and dashboards show gaps that look like application problems. Generate per-service files from one shared base, or pin a common version in a platform repository. Compare the effective configuration across services on a schedule, and flag any service still using an endpoint that has been retired.
Protect the Collector endpoints
Where the file points an SDK at a Collector, the receiving endpoint needs its own controls. Current Collector guidance recommends encryption and authentication on receivers, and redaction of sensitive attributes before data leaves your network. Confirm the Collector receiver binds where you expect, since server components bind to localhost by default from v0.110.0. Ask your implementation partner to verify these settings in your environment before you rely on them.
Collector security practicesHow a YAML file moves from repository to running service
The path starts with a configuration file committed to version control and reviewed like any other code change. A pipeline then validates the file against the declarative configuration schema before it is promoted to a staging environment. The Java agent reads the file at startup, configures the SDK, and sends telemetry to the Collector, which forwards it to the back end. Check the validation step and the Collector's receiving settings before each promotion, since a file that passes review can still fail at startup.
Configuration moves through review and a validation gate before the SDK reads it.
Limits to confirm before you commit to YAML
Declarative configuration is only as stable as the SDK, agent and schema versions underneath it. The checks below cover what you must confirm in your own environment before you move settings out of environment variables and into one file. Each one is a question to answer with test evidence, not an assumption from the schema documentation.
Confirm SDK support per language
The schema is stable, but implementation support in SDKs is still experimental, and the docs list Java as a supporting SDK. Check the SDK version and language you run in each service, not the language in general. Record which services can read the file today and which still need environment variables. Ask the SDK maintainers or your platform team to confirm this against the exact versions in production.
Declarative configuration docsMap keys still under development
Schema parts suffixed with /development are experimental and can change. Before you write the file, list every key you plan to use and mark any that carry the /development suffix. Keep those keys in a separate section of your configuration repository so a change to them is easy to find and test during upgrades.
Match agent version to schema version
The Java agent and the schema version it reads must line up, or keys may be ignored without a clear error. Pin the agent version in your deployment manifests and confirm which schema version that agent expects. Treat an agent upgrade as a configuration change that needs its own test run, not as a routine image bump.
Validate the file before rollout
A file that parses is not the same as a file that is applied. Confirm that the agent logs which keys it loaded and which it rejected, and check that a deliberately wrong value fails in a visible way. Run the same file in a non-production cluster first and compare the emitted spans, metrics and logs with the output of the environment variable setup it replaces.
Check Collector and backend acceptance
Confirm that your Collector and backend accept the exported data unchanged after the move. Changed resource attributes, sampler settings or exporter endpoints can alter what dashboards and alerts receive, even when the application still runs. Compare sample traces and metric names before and after, and confirm that the Collector configuration does not need changes for the new exporter setup.
Secure the configuration file
The YAML file may hold endpoints, headers or credentials, so it needs the same controls as other Collector configuration. Store it in version control with access limited to the teams that own it, and keep secrets out of the file itself. Review the OpenTelemetry security guidance for Collector configuration to confirm that your handling of secrets and encryption matches it.
Config security practicesQuestions buyers ask before rolling out declarative configuration
What drives the cost of rolling out declarative configuration?
The cost depends mostly on how many services, languages and deployment pipelines need to change, and on how many environment variables each one sets today. Your team pays for internal time to inventory existing settings, decide which keys belong in the YAML file, and review changes with platform and security owners. A partner's fee covers the same work plus the written scope, test runs and handover. No fact supplied for this topic gives a price or effort figure, so ask any quote to break out the number of services, the number of pipelines touched, and whether testing and rollback are included. Expect most of the cost to be one-time, with small recurring effort when the schema changes.
How long does a declarative configuration rollout take?
Duration is set by the number of services in scope, how consistent their current configuration is, and how many environments must be validated before production. A team with one Java service and a single deployment path will finish far sooner than one with dozens of services across several clusters. No researched duration is available for this topic, so ask for a timeline tied to a named list of services and environments, with checkpoints for pilot, staging and production. Include time for change control if your organization requires approval for production configuration.
What does the team need to supply for this work?
You need someone who owns the current telemetry setup, someone who can change the deployment pipeline, and someone who can approve configuration changes for each environment. The work also needs access to a non-production cluster or host where the Java agent can be tested safely. Engineers should be ready to document which environment variables are in use today, because the YAML file replaces them only for the settings it covers. Ask the partner to name these roles in the written scope so that decisions do not wait on people who were never assigned.
Can our own engineers roll out declarative configuration in-house?
Yes, a team that already runs OpenTelemetry in Java can usually do the work in-house if it has time to test and a clear rollback plan. The main risk is treating the file as a simple swap for environment variables, which can leave some settings in effect from both sources. A partner is most useful when many services need the same pattern, when your security team needs evidence of review, or when internal staff are committed to other work. Decide this by comparing your team's capacity with the service count and the approval steps your organization requires.
How should we handle experimental keys in the YAML file?
Treat any key with a /development suffix as experimental, because the stable schema is separate from those parts and their behavior can change. Keep experimental keys out of production configuration unless a specific need justifies the risk and the change is recorded. Pin the schema version your SDK documents, store the file in version control, and review the OpenTelemetry declarative configuration documentation before each upgrade. Have the partner or your team list every experimental key in use so the risk owner can accept it in writing.
Does Java support declarative configuration today?
The declarative configuration documentation lists Java as a supporting SDK, but it also notes that support in implementations is still experimental. Confirm the exact agent or SDK version you plan to deploy, and check which configuration keys it honors before writing the file. Do not assume that every language supported for traces is also supported for declarative configuration. Ask the partner to verify support for each language and component in your environment during the scoping phase.
How does a partner scope declarative configuration work?
A partner scopes the work by inventorying services, languages, deployment methods and current environment variables, then agreeing deliverables in writing before any change is made. Typical written items include the list of services, the target YAML files, the test plan, the rollback steps and the handover documentation. Most DeployOpen engagements are fixed-scope, so the scope, deliverables and timeline are agreed in writing before work starts. Ask for the scope document to name each service, each environment and the acceptance criteria for each.
What should we verify before and after the change?
Before the change, confirm which settings each service reads today, which SDK and agent versions are deployed, and which keys in the new file are stable. After the change, check that exported telemetry still arrives with the expected resource attributes, sampling and endpoints, and that no setting is duplicated or silently ignored. Keep a record of the configuration each environment ran before and after, so rollback is a documented step rather than a guess. Ask the partner to show how this verification will be reported to your security and operations owners.
What an implementation partner scopes for this change
A partner should start by agreeing the scope in writing before any YAML is written. The first work item is an inventory of services and existing variables: every application, agent and Collector that reads OpenTelemetry settings, the environment variables each one sets today, where those variables live (deployment manifests, container images, CI pipelines, shell profiles) and which teams own them. Expect the inventory to surface variables that nobody remembers setting, and duplicate or conflicting values across environments. Agree on the output format and who signs off on it, because the rest of the plan depends on this list being complete.
The second item is schema support confirmation. The declarative configuration schema is stable, but the docs state that support in implementations is still experimental and that Java is listed as a supporting SDK. Ask the partner to confirm, per language and per SDK version you run, which keys are honored, which fall under the /development suffix, and which environment variables still apply alongside the file. The written scope should name the exact SDK and agent versions covered, because a change in either can alter what the file controls.
The remaining items are the YAML design and review, validation against current telemetry, staged rollout and handover. Design covers file layout, secret references, and which settings are shared across services. Validation compares span, metric and log output before and after the change, so the team can confirm that resource attributes, sampling and exporters behave as before. Rollout should proceed one environment at a time with a rollback path. Handover includes the reviewed file, the variable-to-key mapping, runbooks and named owners. Ask for these deliverables in the quote, and confirm timelines in the written scope, since they depend on the inventory size and the number of services involved.
How DeployOpen scopes and delivers OpenTelemetry configuration work
DeployOpen plans, builds, documents and hands over OpenTelemetry declarative configuration with YAML inside infrastructure you control. Each engagement starts from a written scope that names the services, SDK languages and rollout waves covered, so your teams know what is in and out before work begins.
How we scope
- Inventory the services, languages and SDK versions that will read a declarative configuration file.
- Confirm which SDKs in your estate support the YAML schema today and which need fallback handling.
- Agree in writing which environment variables are mapped, which remain, and who owns the configuration file.
How we build
- Write the configuration file against the stable schema, marking any experimental /development parts explicitly.
- Test the Java agent rollout in a non-production environment before any production service changes.
- Verify exported telemetry against the previous environment-variable setup to confirm signals match before cutover.
How we hand over
- Deliver the configuration files, version pinning notes and a rollback procedure for each service.
- Document which schema parts are experimental so your engineers know what may change in upgrades.
- Run a handover session with platform and application teams covering review, change and ownership steps.
How we support
- Offer ongoing support, upgrades and continuous testing as a retainer after handover.
- Review schema and SDK release notes when you plan an upgrade, then test the configuration again.
- Ask for a quote that lists scope, deliverables and timelines, since engagements are fixed-scope.

