[WIP] perf(telemetry): serialize batches on shared thread pool - #1946
Open
jpnurmi wants to merge 13 commits into
Open
[WIP] perf(telemetry): serialize batches on shared thread pool#1946jpnurmi wants to merge 13 commits into
jpnurmi wants to merge 13 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## jpnurmi/perf/thread-pool #1946 +/- ##
============================================================
+ Coverage 76.08% 76.30% +0.21%
============================================================
Files 94 94
Lines 22441 22678 +237
Branches 4017 4051 +34
============================================================
+ Hits 17075 17305 +230
- Misses 4468 4471 +3
- Partials 898 902 +4 🚀 New features to boost your workflow:
|
jpnurmi
force-pushed
the
jpnurmi/perf/telemetry-pool
branch
from
August 4, 2026 11:44
ae3b36a to
53a8c3e
Compare
jpnurmi
force-pushed
the
jpnurmi/perf/telemetry-pool
branch
from
August 4, 2026 12:37
53a8c3e to
e8103ca
Compare
jpnurmi
force-pushed
the
jpnurmi/perf/telemetry-pool
branch
from
August 4, 2026 13:51
e8103ca to
af6d19c
Compare
jpnurmi
force-pushed
the
jpnurmi/perf/telemetry-pool
branch
from
August 5, 2026 09:46
7e20632 to
ccf9950
Compare
jpnurmi
force-pushed
the
jpnurmi/perf/telemetry-pool
branch
from
August 5, 2026 10:14
ccf9950 to
a5e9fef
Compare
jpnurmi
force-pushed
the
jpnurmi/perf/telemetry-pool
branch
from
August 6, 2026 08:17
a5e9fef to
bd10425
Compare
jpnurmi
force-pushed
the
jpnurmi/perf/telemetry-pool
branch
from
August 6, 2026 10:55
bd10425 to
9cb4261
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9cb4261. Configure here.
Let the telemetry lifecycle own a shared serialization pool for enabled telemetry batchers. Use the pool for log and metric batch serialization while keeping completion ordered through the batcher flush lifecycle.
Convert the telemetry batcher from the removed sentry__spin_lock helpers to the promoted sentry__spinlock_* API. The ref guard, in-flight task list, and flush reentrancy guard are all spinlocks, so store them as sentry_spinlock_t instead of raw long fields. Use sentry__spinlock_try_lock for the normal flush path. It preserves the existing one-shot behavior when another flush is active while using the same primitive as the crash-safe wait path. Remove the temporary sentry__spin_lock* compatibility aliases now that the batcher is on the shared API.
Keep crash-safe flushes from making a started batcher thread look fully stopped before normal shutdown has a chance to wake and join it. Always run the final flush and task drain so linked serialization tasks cannot outlive the batcher they reference. Add regression coverage for crash-safe flush followed by shutdown while thread-pool work is still pending.
jpnurmi
force-pushed
the
jpnurmi/perf/telemetry-pool
branch
from
August 6, 2026 14:46
261cfe1 to
1134ee2
Compare
This file contains hidden or 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
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.

Warning
WIP 🚧🔨⏳⛔
before-vs-after.ftrace.zip
Close: #1862
Stack created with GitHub Stacks CLI • Give Feedback 💬