-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[component] Refactor to use pipeline.ID and pipeline.Signal #11204
[component] Refactor to use pipeline.ID and pipeline.Signal #11204
Conversation
fe90c10
to
1225ae3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11204 +/- ##
==========================================
- Coverage 91.80% 91.41% -0.39%
==========================================
Files 424 424
Lines 20094 20198 +104
==========================================
+ Hits 18447 18465 +18
- Misses 1268 1349 +81
- Partials 379 384 +5 ☔ View full report in Codecov by Sentry. |
1225ae3
to
3a776d6
Compare
#### Description To facilitate the work in #11204 as some breaking changes and some deprecations, this PR adds the new pipeline module separately so that future PRs can handle the breaking changes and deprecations. In order to make `Signal` uninstantiable outside of this repo, while still being extendable in places like `componentprofiles`, a new internal module is added to handle the `Signal` logic. To reduce the dependency sprawl that would happen if `signal` was an internal package in `go.opentelemetry.io/collector`, I made it a module, similar to `globalgates`. <!-- Issue number if applicable --> #### Link to tracking issue Related to #10947 <!--Describe what testing was performed and which tests were added.--> #### Testing Added unit tests <!--Describe the documentation added.--> #### Documentation Added godoc comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than fixing the merge conflicts, this looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing my comments
#### Description As part of #11204 I left `host`'s implementation of `GetExporters` alone, thinking I didn't need to change a deprecated interface implementation. But `GetExporters` depends on `component.DataType`, so we won't be able to remove `component.DataType` unless `GetExporters` is updated to use `pipeline.Signal` instead. This PR deprecates the deprecated `GetExporters` interface with `GetExportersWithSignal`, which uses `pipeline.Signal`. Then we'll follow the process to rename `GetExportersWithSignal` back to `GetExporters`.
**Description:** Update core libraries. Handle deprecations and breaking changes from open-telemetry/opentelemetry-collector#11204
…emetry#11204) #### Description Depends on open-telemetry#11209 This PR is a non-breaking implementation of open-telemetry#10947. It adds a new module, `pipeline`, which houses a `pipeline.ID` and `pipeline.Signal`. `pipeline.ID` is used to identify a pipeline within the service. `pipeline.Signal` is uses to identify the signal associated to a pipeline. I do this work begrudgingly. As the PR shows, this is a huge refactor when done in a non-breaking way, will require 3 full releases, and doesn't benefit our [End Users or, in my opinion, our Component Developers or Collector Library Users](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CONTRIBUTING.md#target-audiences). I view this refactor as a Nice-To-Have, not a requirement for Component 1.0. <!-- Issue number if applicable --> #### Link to tracking issue Works towards open-telemetry#9429
#### Description As part of open-telemetry#11204 I left `host`'s implementation of `GetExporters` alone, thinking I didn't need to change a deprecated interface implementation. But `GetExporters` depends on `component.DataType`, so we won't be able to remove `component.DataType` unless `GetExporters` is updated to use `pipeline.Signal` instead. This PR deprecates the deprecated `GetExporters` interface with `GetExportersWithSignal`, which uses `pipeline.Signal`. Then we'll follow the process to rename `GetExportersWithSignal` back to `GetExporters`.
**Description:** Update core libraries. Handle deprecations and breaking changes from open-telemetry/opentelemetry-collector#11204
#### Description To facilitate the work in open-telemetry#11204 as some breaking changes and some deprecations, this PR adds the new pipeline module separately so that future PRs can handle the breaking changes and deprecations. In order to make `Signal` uninstantiable outside of this repo, while still being extendable in places like `componentprofiles`, a new internal module is added to handle the `Signal` logic. To reduce the dependency sprawl that would happen if `signal` was an internal package in `go.opentelemetry.io/collector`, I made it a module, similar to `globalgates`. <!-- Issue number if applicable --> #### Link to tracking issue Related to open-telemetry#10947 <!--Describe what testing was performed and which tests were added.--> #### Testing Added unit tests <!--Describe the documentation added.--> #### Documentation Added godoc comments
…emetry#11204) #### Description Depends on open-telemetry#11209 This PR is a non-breaking implementation of open-telemetry#10947. It adds a new module, `pipeline`, which houses a `pipeline.ID` and `pipeline.Signal`. `pipeline.ID` is used to identify a pipeline within the service. `pipeline.Signal` is uses to identify the signal associated to a pipeline. I do this work begrudgingly. As the PR shows, this is a huge refactor when done in a non-breaking way, will require 3 full releases, and doesn't benefit our [End Users or, in my opinion, our Component Developers or Collector Library Users](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CONTRIBUTING.md#target-audiences). I view this refactor as a Nice-To-Have, not a requirement for Component 1.0. <!-- Issue number if applicable --> #### Link to tracking issue Works towards open-telemetry#9429
#### Description As part of open-telemetry#11204 I left `host`'s implementation of `GetExporters` alone, thinking I didn't need to change a deprecated interface implementation. But `GetExporters` depends on `component.DataType`, so we won't be able to remove `component.DataType` unless `GetExporters` is updated to use `pipeline.Signal` instead. This PR deprecates the deprecated `GetExporters` interface with `GetExportersWithSignal`, which uses `pipeline.Signal`. Then we'll follow the process to rename `GetExportersWithSignal` back to `GetExporters`.
**Description:** Update core libraries. Handle deprecations and breaking changes from open-telemetry/opentelemetry-collector#11204
Description
Depends on #11209
This PR is a non-breaking implementation of #10947. It adds a new module,
pipeline
, which houses apipeline.ID
andpipeline.Signal
.pipeline.ID
is used to identify a pipeline within the service.pipeline.Signal
is uses to identify the signal associated to a pipeline.I do this work begrudgingly. As the PR shows, this is a huge refactor when done in a non-breaking way, will require 3 full releases, and doesn't benefit our End Users or, in my opinion, our Component Developers or Collector Library Users. I view this refactor as a Nice-To-Have, not a requirement for Component 1.0.
Link to tracking issue
Works towards #9429