Repository navigation
ref(core): Let InternalServices own the executor shutdown - #6831
Open
runningcode wants to merge 3 commits into
Open
runningcode wants to merge 3 commits into
runningcode wants to merge 3 commits into
Conversation
Contributor
PR risk: mediumFor commit Main concerns: public contract, reach, host performance. Rules that block low also fired:
This label is a hint for reviewers, not an approval. |
📲 Install BuildsAndroid
|
runningcode
force-pushed
the
no/sentryruntime-foundation
branch
from
December 3, 2026 12:24
4b9b580 to
a993645
Compare
runningcode
force-pushed
the
no/sentryruntime-executor-shutdown
branch
from
December 3, 2026 12:24
9b97dd6 to
6f20270
Compare
4 of 9 tasks
runningcode
force-pushed
the
no/sentryruntime-executor-shutdown
branch
from
December 3, 2026 12:51
a4bc0de to
e704c78
Compare
runningcode
force-pushed
the
no/sentryruntime-executor-shutdown
branch
from
December 3, 2026 14:51
e704c78 to
b301d9b
Compare
Scopes.close now asks InternalServices to shut the executor down instead of reading it off SentryOptions. The root Scopes gets InternalServices from Sentry.init and passes it to its forks; a Scopes created through the public constructor falls back to the internal services on its options. Sentry.init builds InternalServices before the Scopes, so a closed executor from a previous init is now replaced before anything uses it. Part of JAVA-817 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Now that Sentry.init builds InternalServices before initConfigurations, the old-profile cleanup, the BackpressureMonitor and the JVM continuous profiler get the executor from it instead of from SentryOptions. BackpressureMonitor and InitUtil.initializeProfiler gain overloads that take the executor. The old ones keep reading it off the options, which Spring still needs because it creates the profiler before Sentry.init. Part of JAVA-817 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of JAVA-817 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
runningcode
force-pushed
the
no/sentryruntime-executor-shutdown
branch
from
December 3, 2026 15:03
b301d9b to
dab6ded
Compare
runningcode
marked this pull request as ready for review
December 3, 2026 15:26
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Scopes.closenow hands the executor shutdown toInternalServices.closeinstead of reading the executor offSentryOptions. The rootScopesgetsInternalServicesfromSentry.initand passes it to its forks.A
Scopescreated through the public constructor has noInternalServices, so it falls back to the internal services on its options and closes as before.Because
InternalServicesnow exists beforeinitConfigurations, its three executor users switch to that executor too:The old
BackpressureMonitorconstructor andInitUtil.initializeProfiler(options)stay. Spring still needs the latter, because it creates the profiler bean beforeSentry.init.One behavior change: a closed executor passed to
init, when options are reused afterSentry.close(), is now replaced beforeinitConfigurationsuses it. Before, the old-profile cleanup ran on the closed executor and logged "Old profiles will not be deleted".SentryTestcovers it.💡 Motivation and Context
Part of JAVA-817. Stacked on #6830.
💚 How did you test it?
New
InternalServicesTestcases forclose, and the updatedSentryTestcase.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Retarget to
mainonce #6830 merges.🤖 Generated with Claude Code
#skip-changelog