Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hcngo
Copy link

@hcngo hcngo commented Jul 29, 2024

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.

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.
@hcngo hcngo requested review from a team and evan-bradley July 29, 2024 12:48
Copy link

linux-foundation-easycla bot commented Jul 29, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link

codecov bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@a6287ac). Learn more about missing BASE report.
Report is 357 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@hcngo
Copy link
Author

hcngo commented Aug 5, 2024

@evan-bradley Hi Evan, can I get a review on this PR please?

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added Stale and removed Stale labels Aug 21, 2024
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Sep 10, 2024
@github-actions github-actions bot removed the Stale label Sep 19, 2024
Copy link
Contributor

github-actions bot commented Oct 4, 2024

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added Stale and removed Stale labels Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant