opentelemetry-collector
opentelemetry-collector copied to clipboard
[cmd/builder] Allow configuring confmap converters and providers
Description:
Allow configuring confmap converters and providers in the builder's config. If either config field isn't set, the default set of converters/providers is used.
Currently builds upon https://github.com/open-telemetry/opentelemetry-collector/pull/9228 and https://github.com/open-telemetry/opentelemetry-collector/pull/9461, but I'll remove those commits from this PR once they are merged.
Link to tracking Issue:
Resolves https://github.com/open-telemetry/opentelemetry-collector/issues/4759.
Testing:
Extended unit tests.
Documentation:
Will update the docs once the PR is ready.
cc @mx-psi
Codecov Report
Attention: Patch coverage is 68.29268% with 13 lines in your changes are missing coverage. Please review.
Project coverage is 91.63%. Comparing base (
7b046d9) to head (6ef69ce).
Additional details and impacted files
@@ Coverage Diff @@
## main #9513 +/- ##
==========================================
- Coverage 91.65% 91.63% -0.03%
==========================================
Files 360 360
Lines 16639 16676 +37
==========================================
+ Hits 15251 15281 +30
- Misses 1053 1058 +5
- Partials 335 337 +2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Both dependencies have been merged, is this ready for review?
@mx-psi I think this is ready to go, please take a look.
This PR was marked stale due to lack of activity. It will be closed in 14 days.
Will wait for #9516 before giving another pass to this one
Will wait for https://github.com/open-telemetry/opentelemetry-collector/pull/9516 before giving another pass to this one
I've also been waiting for that, I will let you know once I update this PR to include those changes.
@mx-psi I've updated this to use confmap factories and to account for https://github.com/open-telemetry/opentelemetry-collector/pull/9897.
I've updated this to not use the new APIs if the builder is working with versions before v0.99.0. It looks like the new strict versioning functionality will force the builder and core API versions to be equal, according to this line. Should we expect that when the flag to skip strict versioning is removed we can also remove the v0.99.0 version check?
@evan-bradley I did not intend for that change to go through just yet, and this is also not documented, so I filed #9999 to document it. We can handle this separately.
IMO we should be a bit more lenient and allow for some version skew between the builder and the Collector being built (at least one minor version of difference should be fine based on our deprecation guidelines, and would be in line with the Kubernetes version skew policy)
Thanks for the clarification. I agree we should probably allow some minor skew even if it's a bit inconvenient, it would feel pretty demanding to have to update the builder every single release.
I think this PR should be unaffected by that change and should still be ready to go.