Repository navigation
ref: Remove unused code - #6826
Merged
Merged
Conversation
Remove Internal and package-private code that nothing in the SDK calls anymore, and move a production constant that only tests read into the tests.
Contributor
PR risk: highFor commit Main concerns: public contract, reach. Rules that block low also fired:
This label is a hint for reviewers, not an approval. |
📲 Install BuildsAndroid
|
adinauer
approved these changes
Dec 1, 2026
runningcode
marked this pull request as ready for review
December 1, 2026 15:20
runningcode
requested review from
0xadam-brown and
romtsn
and removed request for
a team
December 1, 2026 15:20
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
Removes code that nothing calls anymore. Every removed member is
@ApiStatus.Internalor not public, so there is no change to the public API.sentry.apionly loses Internal entries.NoOpLoggerBatchProcessorsentryNoOpMetricsBatchProcessorsentrySentryOptions.containsIgnoredExceptionForTypesentryMemoryLimiterIntegration.MEMORY_LIMITER_DESCRIPTIONsentry-android-coreMEMORY_LIMITER_DESCRIPTION_PREFIX. OnlyMemoryLimiterIntegrationTestandApplicationExitInfoCrossIntegrationTestread the constant, as fixture data, so the value now lives in those tests.DebugOverlayDrawable.paddingsentry-android-replayNone of these are referenced from any Java, Kotlin, or Groovy source, XML, ProGuard or consumer rules,
META-INF/services, Gradle files,sentry-samples, orsentry-android-integration-tests. Nothing reaches them through reflection, ServiceLoader, or the manifest either.Left in place on purpose:
HintUtils.runIfDoesNotHaveTypewithHintUtils.SentryNullableConsumer, andSentryExecutorService.isSentryExecutorThread()with its marker thread subclass: no callers since Discard envelopes on4xxand5xxresponse #4950 and perf(core): Batch and coalesce scope-persistence disk writes #5791. They are kept because ref(core): [Hybrid SDK API 1] Mark the non-customer API that hybrid SDKs use #6785 marks both classes@HybridSdkApi, so they should wait for that PR to land.NoOpSubscriptionHandler(graphql): only tests use it, but the GraphQL integration docs show it to users.ScopesUtil.printScopesChain: no callers, but it looks like a deliberate tool for debugging by hand.AndroidCurrentDateProvider: unused, but deprecated and waiting for removal in a major version.SentryReplayOptions.setTrackConfiguration: no callers in this repo, but its Javadoc describes manual use, likely by hybrid SDKs.@TestOnlyaccessors whose only callers are tests, such as theActivityLifecycleIntegrationspan maps,SentryTracertimer futures, andAppStartMetricssetters: these are test seams that assert on real behavior.AppStartMetricsis also used by hybrid SDKs.io.sentry.util.Random: vendored code, and the class isSerializable.💡 Motivation and Context
Dead Internal code makes the API dump and the codebase bigger with no benefit.
📝 Checklist
sendDefaultPIIis enabled.#skip-changelog
via automation
sched_fe84dfba72a04a9279fe3ffbedff96f0· Run IDsched_fe84dfba72a04a9279fe3ffbedff96f0:1796115600000.--
View Session [Sentry]