[WIP] perf: serialize telemetry batches on shared thread pool - #1883
#1883[WIP] perf: serialize telemetry batches on shared thread pool#1883jpnurmi wants to merge 5 commits intomastergetsentry/sentry-native:masterfrom jpnurmi/perf/thread-poolgetsentry/sentry-native:jpnurmi/perf/thread-poolCopy head branch name to clipboard
Conversation
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
### Features
- serialize telemetry batches on shared thread pool ([#1883](https://github.com/getsentry/sentry-native/pull/1883))If none of the above apply, you can opt out of this check by adding |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1883 +/- ##
==========================================
+ Coverage 75.73% 75.99% +0.25%
==========================================
Files 93 94 +1
Lines 22082 22471 +389
Branches 3932 4005 +73
==========================================
+ Hits 16724 17077 +353
- Misses 4471 4504 +33
- Partials 887 890 +3 🚀 New features to boost your workflow:
|
2996a56 to
ec39dc8
Compare
ec39dc8 to
829189b
Compare
829189b to
406b054
Compare
406b054 to
03159d6
Compare
e417bed to
12f4872
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.
Reviewed by Cursor Bugbot for commit 12f4872. Configure here.
07e343d to
2662e3f
Compare
Let crash backends suspend the transport's network submission and automatically route crash-time envelopes through its disk-dump path. This removes the need for allocating fallback disk transports in the backends, and prepares for the upcoming thread-pool telemetry module, which cannot safely drain the transport queue from a crash handler.
Give the logs and metrics batchers distinct OS-level thread names while keeping the batcher implementation generic. Named dedicated threads make profiling and tracing easier because background work can be identified directly in debuggers, crash dumps, and trace timelines instead of showing up as anonymous worker activity.
Add a bounded thread pool that runs tasks in parallel and invokes completion callbacks in submission order. Add unit coverage for ordered parallel execution.
Add an internal telemetry lifecycle layer for logs and metrics startup, shutdown, force flush, and crash-safe flush. Keep the existing logs and metrics behavior behind the shared coordination API.
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.
2662e3f to
d1a77fe
Compare
Warning
WIP 🚧🔨⏳⛔
before-vs-after.ftrace.zip
Close: #1862