-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[processor/deltatocumulative]: linear pipeline #34757
Conversation
e3ec884
to
9de4074
Compare
no changelog needed imo |
9de4074
to
e9e38ce
Compare
Transforms the processors main logic from a deeply-nested, map structure that overloads the Store operation to a strongly decoupled, linear processing flow that nearly entirely happens within `ConsumeMetrics`, greatly improving understandability of the code
moves most tests from `internal/delta` to the processor itself, excercising the public api.
hides types from public api that don't need to be public
adds summary datatype to make type switch exhaustive
85c35c5
to
d182712
Compare
Hey @sh0rez, I'd love to help you out here but I'm new to the codebase and 2k line changes might be a bit too much for my first review 😅 Do you think you could break this PR into smaller ones? Or maybe you could tell me the biggest problems of the current codebase, I could try to come up with the refactoring myself and you review? The options above are just to unblock you, if you think you can progress without my help please do so :) |
Closing in favor of #35048 |
**Description:** Partially introduces a highly decoupled, linear processing pipeline. Implemented as a standalone struct to make review easier, will refactor this later. Instead of overloading `Map.Store()` to do aggregation, staleness and limiting, this functionality is now explcitly handled in `ConsumeMetrics`. This highly aids readability and makes understanding this processor a lot easier, as less mental context needs to be kept. *Notes to reviewer*: See [`68dc901`](68dc901) for the main added logic. Compare `processor.go` (old, nested) to `linear.go` (new, linear) Replaces #34757 **Link to tracking Issue:** none **Testing:** This is a refactor. Existing tests were not modified and still pass **Documentation:** not needed
…#35048) **Description:** Partially introduces a highly decoupled, linear processing pipeline. Implemented as a standalone struct to make review easier, will refactor this later. Instead of overloading `Map.Store()` to do aggregation, staleness and limiting, this functionality is now explcitly handled in `ConsumeMetrics`. This highly aids readability and makes understanding this processor a lot easier, as less mental context needs to be kept. *Notes to reviewer*: See [`68dc901`](open-telemetry@68dc901) for the main added logic. Compare `processor.go` (old, nested) to `linear.go` (new, linear) Replaces open-telemetry#34757 **Link to tracking Issue:** none **Testing:** This is a refactor. Existing tests were not modified and still pass **Documentation:** not needed
Description:
Refactors the high-level pipeline to lower general complexity.
Before:
streams.Map
based pipelineMap.Store
methodsAfter:
ConsumeMetrics
that ties together staleness, limits, accumulation, etc.Link to tracking Issue: none
Testing: Existing tests were adapted to new architecture
Documentation: not needed