-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[confmap] Add converter and provider settings to confmap.ResolverSettings #9516
[confmap] Add converter and provider settings to confmap.ResolverSettings #9516
Conversation
15c96dc
to
55f5221
Compare
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
@evan-bradley can you fix the merge conflict? I think that would make it ready for review :) |
8e07bb3
to
77dab0c
Compare
@mx-psi Should be good-to-go now, please take a look. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9516 +/- ##
==========================================
+ Coverage 91.76% 91.77% +0.01%
==========================================
Files 358 359 +1
Lines 16604 16631 +27
==========================================
+ Hits 15236 15263 +27
Misses 1041 1041
Partials 327 327 ☔ View full report in Codecov by Sentry. |
@evan-bradley Can you address the linter issue?
|
860d0d4
to
c4bdf49
Compare
@mx-psi Thanks for the heads-up, I think everything should be taken care of now. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
c4bdf49
to
7948b77
Compare
41e63f6
to
04cd145
Compare
04cd145
to
1c367cc
Compare
@mx-psi This is ready for another look whenever you are able. |
@evan-bradley can you address the linter on here?
|
@mx-psi The build is green! 🎉 |
**Description:** Follows open-telemetry/opentelemetry-collector#9516. This doesn't introduce any functional changes, just uses the new API. --------- Co-authored-by: Evan Bradley <evan-bradley@users.noreply.github.com> Co-authored-by: Curtis Robert <crobert@splunk.com>
**Description:** Follows open-telemetry/opentelemetry-collector#9516. This doesn't introduce any functional changes, just uses the new API. --------- Co-authored-by: Evan Bradley <evan-bradley@users.noreply.github.com> Co-authored-by: Antoine Toulme <antoine@lunar-ocean.com>
After #9516, the `validate` sum-command works differently from the root command. If a downstream distribution provides `URIs` as part of the new `ConfigProviderSettings` without `--config` flag, the `validate` command fails with ``` 2024/05/21 15:53:25 main.go:85: application run finished with error: at least one config flag must be provided ```
The `Providers` and `Converters` fields of `ResolverSettings` struct were deprecated in [v0.99.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.99.0) (open-telemetry/opentelemetry-collector#9516) and removed in [v0.101.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.101.0). This refactoring is required before updating to OTel v0.101.0.
…lemetry#10203) After open-telemetry#9516, the `validate` sum-command works differently from the root command. If a downstream distribution provides `URIs` as part of the new `ConfigProviderSettings` without `--config` flag, the `validate` command fails with ``` 2024/05/21 15:53:25 main.go:85: application run finished with error: at least one config flag must be provided ```
The `Providers` and `Converters` fields of `ResolverSettings` struct were deprecated in [v0.99.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.99.0) (open-telemetry/opentelemetry-collector#9516) and removed in [v0.101.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.101.0). This refactoring is required before updating to OTel v0.101.0.
…lemetry#10203) After open-telemetry#9516, the `validate` sum-command works differently from the root command. If a downstream distribution provides `URIs` as part of the new `ConfigProviderSettings` without `--config` flag, the `validate` command fails with ``` 2024/05/21 15:53:25 main.go:85: application run finished with error: at least one config flag must be provided ```
The `Providers` and `Converters` fields of `ResolverSettings` struct were deprecated in [v0.99.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.99.0) (open-telemetry/opentelemetry-collector#9516) and removed in [v0.101.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.101.0). This refactoring is required before updating to OTel v0.101.0.
Description:
Follows #9443, relates to #9513.
This builds on #9228 to demonstrate the concept.
This shows one way of extending the otelcol APIs to allow passing converters and providers from the builder with the new settings structs for each type.
I think this approach has a few advantages:
main.go
file can specify the providers/converters it wants and leave the settings to be created byotelcol.Collector
.The primary drawbacks I see here are:
cc @mx-psi