-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[chore][exporter][batcher] Improve exporter.request merge splitting performance by caching items count #12136
Merged
bogdandrutu
merged 1 commit into
open-telemetry:main
from
sfc-gh-sili:sili-cache-item-size
Jan 22, 2025
Merged
[chore][exporter][batcher] Improve exporter.request merge splitting performance by caching items count #12136
bogdandrutu
merged 1 commit into
open-telemetry:main
from
sfc-gh-sili:sili-cache-item-size
Jan 22, 2025
+198
−30
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sfc-gh-sili
changed the title
Cache item size
[chore] Improve exporter.request merge splitting performance by caching items count
Jan 21, 2025
sfc-gh-sili
changed the title
[chore] Improve exporter.request merge splitting performance by caching items count
[chore][exporter][batcher] Improve exporter.request merge splitting performance by caching items count
Jan 21, 2025
sfc-gh-sili
force-pushed
the
sili-cache-item-size
branch
3 times, most recently
from
January 21, 2025 02:07
d09845d
to
2d054e5
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12136 +/- ##
==========================================
+ Coverage 91.73% 91.74% +0.01%
==========================================
Files 463 463
Lines 24819 24852 +33
==========================================
+ Hits 22767 22800 +33
Misses 1670 1670
Partials 382 382 ☔ View full report in Codecov by Sentry. |
sfc-gh-sili
force-pushed
the
sili-cache-item-size
branch
from
January 21, 2025 02:17
2d054e5
to
a4d365d
Compare
sfc-gh-sili
requested review from
bogdandrutu,
dmitryax and
a team
as code owners
January 21, 2025 02:21
sfc-gh-sili
force-pushed
the
sili-cache-item-size
branch
from
January 21, 2025 02:21
a4d365d
to
ec00297
Compare
bogdandrutu
reviewed
Jan 21, 2025
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 22, 2025
…ad of &{logs,metrics,traces}Request{} (#12152) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description As part of the effort to cache request size to improve merge splitting performance (See #12137 and #12136), we want to make sure requests are created from create function instead of getting initialized via struct directly. * `newLogsRequest` instead of `&logsRequest{}` * `newMetrcsRequest` instead of `&metricsRequest{}` * `newTracesRequest` instead of `&tracesRequest{}` <!-- Issue number if applicable --> #### Link to tracking issue #12137 <!--Describe what testing was performed and which tests were added.--> #### Testing <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.-->
sfc-gh-sili
force-pushed
the
sili-cache-item-size
branch
2 times, most recently
from
January 22, 2025 01:51
003e29e
to
bc525ed
Compare
sfc-gh-sili
force-pushed
the
sili-cache-item-size
branch
from
January 22, 2025 01:53
bc525ed
to
06b8416
Compare
bogdandrutu
approved these changes
Jan 22, 2025
This was referenced Jan 23, 2025
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 23, 2025
…ty sender (#12169) During #12136 discussion, it was noted that the count may not always be called, but that is not true since we always call it in the observability sender. This PR only simplifies the logic and ensure we always have the right number. Signed-off-by: Bogdan Drutu <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR improves item-based merge splitting by caching item count in
exporter.request
. Benchmarks shows benefits the case where many requests are merged in the same batch. We observed roughly 30 - 75% latency improvement.Link to tracking issue
Fixes #12137
Testing
This PR adds four benchmarks for each event type
Benchmark 1 is designed to test the performance of merging, while Benchmark 2 and 3 are primarily designed to test the performance of splitting. Benchmarks indicate that the optimization implemented in this PR improves merging performance.
Before:
After:
Documentation