-
Notifications
You must be signed in to change notification settings - Fork 1.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
Add a timeout alignment property to batch config #10733
base: main
Are you sure you want to change the base?
Conversation
Add a boolean timeout alignment property to batch processor config and batch sender config. This is to indicate if a batch submission should be aligned at the timeout boundary. Dropbox is adopting Open Telemetry for their internal metrics system. The system uses 10s sampling rate and expects data submission to be more or less at the sampling rate boundary. This is to ensure metric data is ingested and streamed in time to various backend processes. Without the timeout alignment feature, metric data can be submitted quite late. Consider the case when timeout is 10s and the batch processor happens to start at 00:00:07 mark. A request{ts=00:00:09} is sent to the batch processor. This request is associated with ts.truncateUp(samplingRate)=00:00:10 system timestamp. However, it is not until 00:00:07 + 10s = 00:00:17 that a batch is submitted. This data submission is quite late.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10733 +/- ##
=======================================
Coverage ? 92.06%
=======================================
Files ? 404
Lines ? 18833
Branches ? 0
=======================================
Hits ? 17339
Misses ? 1134
Partials ? 360 ☔ View full report in Codecov by Sentry. |
@evan-bradley Hi Evan, can I get a review on this PR please? |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Description
Add a boolean timeout alignment property to batch processor config and batch sender config. This is to indicate if a batch submission should be aligned at the timeout boundary.
Dropbox is adopting Open Telemetry for their internal metrics system. The system uses 10s sampling rate and expects data submission to be more or less at the sampling rate boundary. This is to ensure metric data is ingested and streamed in time to various backend processes.
Without the timeout alignment feature, metric data can be submitted quite late. Consider the case when timeout is 10s and the batch processor happens to start at 00:00:07 mark. A request{ts=00:00:09} is sent to the batch processor. This request is associated with ts.truncateUp(samplingRate)=00:00:10 system timestamp. However, it is not until 00:00:07 + 10s = 00:00:17 that a batch is submitted. This data submission is quite late.
Link to tracking issue
No tracking issue #
Testing
Unit tests added to verify the batch processor and batch sender behavior when timeout alignment is used.
Documentation
Inline comment to indicate the usage.