Skip to content

fix(configuration): remove default propagator initialization#6399

Merged
maryliag merged 2 commits intoopen-telemetry:mainfrom
honeycombio:mike/fix-propagator-defaults
Feb 12, 2026
Merged

fix(configuration): remove default propagator initialization#6399
maryliag merged 2 commits intoopen-telemetry:mainfrom
honeycombio:mike/fix-propagator-defaults

Conversation

@MikeGoldsmith
Copy link
Copy Markdown
Member

Which problem is this PR solving?

Addresses feedback from stale PR #6234

The initializeDefaultConfiguration() function was implicitly configuring propagators with default values (tracecontext, baggage), which violated the OpenTelemetry specification that propagators should NOT be set by default unless explicitly configured.

Short description of the changes

This PR removes the default propagator initialization and ensures propagators are only set when explicitly configured via:

  • Environment variables (OTEL_PROPAGATORS)
  • Configuration files (YAML)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Existing test suite: 48 passing tests in @opentelemetry/configuration
  • New test added: should not set propagators by default verifies propagators are not implicitly configured
  • Updated tests for environment vs file-based config handling
  • Verified file-based configs auto-generate composite_list from composite entries

The 5 pre-existing test failures are unrelated to this change (they involve temporality_preference expectations).

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated (CHANGELOG.md)

Note: This supersedes the stale PR #6234 and incorporates reviewer feedback from @maryliag:

  • Tests placed in ConfigFactory.test.ts (not utils.test.ts)
  • No unrelated baggage/utils.ts changes included

Propagators are no longer implicitly configured with default values
(tracecontext, baggage) in initializeDefaultConfiguration(). They
must now be explicitly set via environment variables or configuration
files to be enabled.

Also adds logic to auto-generate composite_list from composite
entries when parsing YAML configuration files.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@MikeGoldsmith MikeGoldsmith requested a review from a team as a code owner February 11, 2026 19:08
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.50%. Comparing base (fcafab5) to head (3c31616).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6399   +/-   ##
=======================================
  Coverage   95.50%   95.50%           
=======================================
  Files         365      365           
  Lines       11609    11611    +2     
  Branches     2677     2678    +1     
=======================================
+ Hits        11087    11089    +2     
  Misses        522      522           
Files with missing lines Coverage Δ
...al/packages/configuration/src/FileConfigFactory.ts 97.58% <100.00%> (+<0.01%) ⬆️
...l/packages/configuration/src/models/configModel.ts 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread experimental/CHANGELOG.md Outdated
Copy link
Copy Markdown
Contributor

@maryliag maryliag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank for working on this change

@maryliag maryliag added this pull request to the merge queue Feb 12, 2026
Merged via the queue into open-telemetry:main with commit b743747 Feb 12, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants