otelconf: add support for propagators configuration#7977
otelconf: add support for propagators configuration#7977codeboten wants to merge 7 commits intoopen-telemetry:mainfrom
Conversation
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>
Signed-off-by: alex boten <223565+codeboten@users.noreply.github.com>
Signed-off-by: alex boten <223565+codeboten@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
Signed-off-by: alex boten <223565+codeboten@users.noreply.github.com>
| { | ||
| name: "empty composite", | ||
| cfg: configOptions{ | ||
| opentelemetryConfig: OpenTelemetryConfiguration{ | ||
| Propagator: &Propagator{ | ||
| Composite: []*string{}, | ||
| }, | ||
| }, | ||
| }, | ||
| want: propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}), | ||
| wantErr: false, |
There was a problem hiding this comment.
Is this following the specification? Should it not be a noop propagator?
| { | ||
| name: "empty propagator name", | ||
| cfg: configOptions{ | ||
| opentelemetryConfig: OpenTelemetryConfiguration{ | ||
| Propagator: &Propagator{ | ||
| Composite: []*string{ptr(""), ptr("tracecontext")}, | ||
| }, | ||
| }, | ||
| }, | ||
| want: propagation.TraceContext{}, | ||
| wantErr: false, | ||
| }, |
There was a problem hiding this comment.
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?
|
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 |
This is reviving #6727 to add support for configuration of propagators in otelconf.
Fixes #6712