SIGN IN SIGN UP

perf(core): Detect Sentry executor thread without a name scan (#5691)

* perf(core): Detect Sentry executor thread without name scan (JAVA-607)

PersistingScopeObserver.serializeToDisk gated the on-executor fast path by
scanning Thread.currentThread().getName(), which allocates a String and
scans it on every scope mutation (breadcrumb, tag, trace, ...). Tag the
executor threads with a marker Thread subclass and expose an allocation-free
SentryExecutorService.isSentryExecutorThread() check instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Format code

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
N
Nelson Osacky committed
87f4f63c06c855d7424ad789e9d9bd6969efef7b
Parent: 90ff162
Committed by GitHub <noreply@github.com> on 7/6/2026, 1:44:20 PM