Skip to content

otelconf: add support for propagators configuration#7977

Closed
codeboten wants to merge 7 commits intoopen-telemetry:mainfrom
codeboten:codeboten/propagators
Closed

otelconf: add support for propagators configuration#7977
codeboten wants to merge 7 commits intoopen-telemetry:mainfrom
codeboten:codeboten/propagators

Conversation

@codeboten
Copy link
Copy Markdown
Contributor

This is reviving #6727 to add support for configuration of propagators in otelconf.

Fixes #6712

This is reviving open-telemetry#6727 to add support for configuration of propagators in otelconf.

Fixes open-telemetry#6712

Signed-off-by: alex boten <223565+codeboten@users.noreply.github.com>
@codeboten codeboten requested review from a team and pellared as code owners October 3, 2025 18:40
Signed-off-by: alex boten <223565+codeboten@users.noreply.github.com>
Signed-off-by: alex boten <223565+codeboten@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 3, 2025

Codecov Report

❌ Patch coverage is 85.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.6%. Comparing base (a6998a3) to head (48f2207).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
otelconf/v0.3.0/propagator.go 85.0% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #7977   +/-   ##
=====================================
  Coverage   78.6%   78.6%           
=====================================
  Files        184     185    +1     
  Lines      14673   14693   +20     
=====================================
+ Hits       11533   11550   +17     
- Misses      2789    2791    +2     
- Partials     351     352    +1     
Files with missing lines Coverage Δ
otelconf/v0.3.0/propagator.go 85.0% <85.0%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: alex boten <223565+codeboten@users.noreply.github.com>
Signed-off-by: alex boten <223565+codeboten@users.noreply.github.com>
Comment on lines +132 to +142
{
name: "empty composite",
cfg: configOptions{
opentelemetryConfig: OpenTelemetryConfiguration{
Propagator: &Propagator{
Composite: []*string{},
},
},
},
want: propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}),
wantErr: false,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this following the specification? Should it not be a noop propagator?

Comment on lines +144 to +155
{
name: "empty propagator name",
cfg: configOptions{
opentelemetryConfig: OpenTelemetryConfiguration{
Propagator: &Propagator{
Composite: []*string{ptr(""), ptr("tracecontext")},
},
},
},
want: propagation.TraceContext{},
wantErr: false,
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wouldn't it mean that somebody explicitly set an empty string? Is not an error scenario? Shouldn't we failed the parsing if anything is wrong in the YAML file?

@codeboten
Copy link
Copy Markdown
Contributor Author

I revived this code from the original PR but after looking through the change in open-telemetry/opentelemetry-configuration#187, i think it probably makes sense to wait for the 1.0.0-rc2 schema to be supported before bringing in more functionality. I'll focus on that PR instead.

Will close this one for now and implement this once 1.0.0-rc2 is merged

@codeboten codeboten closed this Oct 8, 2025
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.

config: add support for configuring propagators

3 participants