Commit 87f4f63
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>1 parent 90ff162 commit 87f4f63
4 files changed
Lines changed: 21 additions & 2 deletions
File tree
- sentry
- api
- src/main/java/io/sentry
- cache
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3182 | 3182 | | |
3183 | 3183 | | |
3184 | 3184 | | |
| 3185 | + | |
3185 | 3186 | | |
3186 | 3187 | | |
3187 | 3188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
152 | 161 | | |
153 | 162 | | |
154 | 163 | | |
155 | 164 | | |
156 | 165 | | |
157 | | - | |
| 166 | + | |
| 167 | + | |
158 | 168 | | |
159 | 169 | | |
160 | 170 | | |
161 | 171 | | |
162 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
163 | 179 | | |
164 | 180 | | |
165 | 181 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
229 | 230 | | |
230 | 231 | | |
231 | 232 | | |
232 | | - | |
| 233 | + | |
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
| |||
0 commit comments