Skip to content

ref(batcher): name dedicated batcher threads - #1937

Merged
jpnurmi merged 2 commits into
masterfrom
jpnurmi/ref/batcher-thread-names
Aug 3, 2026
Merged

ref(batcher): name dedicated batcher threads#1937
jpnurmi merged 2 commits into
masterfrom
jpnurmi/ref/batcher-thread-names

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Give the logs and metrics batchers distinct OS-level thread names.

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.

Before

$ ps -T -p $(pidof sentry-playground) -o pid,tid,comm
    PID     TID COMMAND
  88207   88207 sentry-playgrou
  88207   88208 QDBusConnection
  88207   88210 [pango] fontcon
  88207   88211 pool-spawner
  88207   88212 gmain
  88207   88213 pool-0
  88207   88214 gdbus
  88207   88215 dconf worker
  88207   88216 WaylandEventThr
  88207   88217 WaylandEventThr
  88207   88225 Thread (pooled)
  [...]
  88207   88232 Thread (pooled)
  88207   88265 sentry-http
  88207   88268 sentry-playgrou     ### <===
  88207   88269 sentry-playgrou     ### <===

After

$ ps -T -p $(pidof sentry-playground) -o pid,tid,comm
    PID     TID COMMAND
  86707   86707 sentry-playgrou
  86707   86708 QDBusConnection
  86707   86710 [pango] fontcon
  86707   86711 pool-spawner
  86707   86712 gmain
  86707   86714 gdbus
  86707   86715 dconf worker
  86707   86716 WaylandEventThr
  86707   86717 WaylandEventThr
  86707   86720 Thread (pooled)
  [...]
  86707   86727 Thread (pooled)
  86707   86732 sentry-http
  86707   86735 sentry-logs         ### <===
  86707   86736 sentry-metrics      ### <===

@jpnurmi
jpnurmi marked this pull request as ready for review August 3, 2026 09:29
jpnurmi added 2 commits August 3, 2026 11:35
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.
@jpnurmi
jpnurmi force-pushed the jpnurmi/ref/batcher-thread-names branch from 1683b3f to 84a0453 Compare August 3, 2026 09:39
@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.80%. Comparing base (c3bca45) to head (84a0453).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1937      +/-   ##
==========================================
- Coverage   75.80%   75.80%   -0.01%     
==========================================
  Files          93       93              
  Lines       22149    22167      +18     
  Branches     3942     3944       +2     
==========================================
+ Hits        16791    16804      +13     
- Misses       4477     4481       +4     
- Partials      881      882       +1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jpnurmi
jpnurmi requested a review from JoshuaMoelans August 3, 2026 10:51
@jpnurmi
jpnurmi merged commit add0ebc into master Aug 3, 2026
101 of 104 checks passed
@jpnurmi
jpnurmi deleted the jpnurmi/ref/batcher-thread-names branch August 3, 2026 12:50
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.

2 participants