-
Notifications
You must be signed in to change notification settings - Fork 306
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
enable the ability for buffering and aggregation to work at the same #851
enable the ability for buffering and aggregation to work at the same #851
Conversation
…cs() and flush_aggregated_metrics since the flushed aggregated metrics are added to the buffer now
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.
Code changes look good to me. Just a minor suggestion to align the config naming.
Lets be sure we manually test/verify:
- aggregation + buffering
- buffering only
- aggregation only
(just for completeness).
Would there be any potential problems with having the default aggregation flush interval that low? old |
Not sure but per vikentiy "I don't have an opinion whether they should share a thread, whatever is simpler I guess. We probably should not change the default flush interval though." @rayz |
@gh123man @carlosroman would it be possible to cut a |
@gorangasic have created the release PR #856. Hopefully should all get approved really soon. |
What does this PR do?
Issue
enable the ability for buffering and aggregation to work at the same
Description of the Change
Refactors code to enable aggregation/buffering at the same time. The aggregator will add the aggregated metrics into the buffer at the end of every flush interval before the buffer sends them to the agent. Aggregation/buffering share the same flush thread and flush interval.
Possible Drawbacks
aggregation and buffering seems tightly coupled, for example
Instead of killing the flush thread when buffering is disabled, (I assume) it needs to check if both aggregation and buffering is disabled before killing the flush thread. May be a good idea to add a if statement in stop_flush_thread to not kill the flush thread if either aggregation or buffering is enabled?
Verification Process
Added unit tests to test aggregation and buffering at the same time.
For Local testing:
Follow these steps for local testing and in the main.py file, enable aggregation and buffering at the same time
main.py
You can add a print statement here to ensure that the agggregated metrics are added to buffer, we would expect that the count metrics are aggregated (single metric with value of 10) inside the buffer
Additional Notes
Release Notes
Review checklist (to be filled by reviewers)
changelog/
label attached. If applicable it should have thebackward-incompatible
label attached.do-not-merge/
label attached.kind/
andseverity/
labels attached at least.