Skip to content

[WIP] perf(telemetry): serialize batches on shared thread pool - #1946

Open
jpnurmi wants to merge 11 commits into
jpnurmi/perf/thread-poolfrom
jpnurmi/perf/telemetry-pool
Open

[WIP] perf(telemetry): serialize batches on shared thread pool#1946
jpnurmi wants to merge 11 commits into
jpnurmi/perf/thread-poolfrom
jpnurmi/perf/telemetry-pool

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Warning

WIP    🚧🔨⏳⛔

  • Let the telemetry module 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.
image

before-vs-after.ftrace.zip

Close: #1862


Stack created with GitHub Stacks CLIGive Feedback 💬

Comment thread src/sentry_batcher.c
Comment thread src/sentry_batcher.c
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.97786% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.32%. Comparing base (e9a1eb3) to head (7e20632).

Additional details and impacted files
@@                     Coverage Diff                      @@
##           jpnurmi/perf/thread-pool    #1946      +/-   ##
============================================================
+ Coverage                     76.11%   76.32%   +0.21%     
============================================================
  Files                            94       94              
  Lines                         22393    22630     +237     
  Branches                       3998     4032      +34     
============================================================
+ Hits                          17045    17273     +228     
- Misses                         4459     4463       +4     
- Partials                        889      894       +5     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/telemetry-pool branch from ae3b36a to 53a8c3e Compare August 4, 2026 11:44
Comment thread src/sentry_batcher.c
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/telemetry-pool branch from 53a8c3e to e8103ca Compare August 4, 2026 12:37
jpnurmi added 4 commits August 4, 2026 15:51
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.
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/telemetry-pool branch from e8103ca to af6d19c Compare August 4, 2026 13:51
Comment thread src/sentry_batcher.c
Comment thread src/sentry_batcher.c Outdated
Comment thread src/sentry_batcher.c
Comment thread src/sentry_batcher.c
Comment thread src/sentry_telemetry.c

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5437735. Configure here.

Comment thread src/sentry_batcher.c
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.

Logs: optimize performance

1 participant