Skip to content

ref(core): Mark internal utils as @ApiStatus.Internal - #6017

Open
sentry-junior[bot] wants to merge 2 commits into
mainfrom
ref/mark-utils-internal
Open

ref(core): Mark internal utils as @ApiStatus.Internal#6017
sentry-junior[bot] wants to merge 2 commits into
mainfrom
ref/mark-utils-internal

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

📜 Description

Mark remaining SDK-only utility types with class-level @ApiStatus.Internal.

19 types across:

  • io.sentry.util helpers (ClassLoaderUtils, LoadClass, LifecycleHelper, SentryRandom, SpanUtils, TracingUtils, UUID helpers, …)
  • io.sentry.util.network replay/network capture helpers
  • module-local: NativeEventUtils, DatabaseUtils, OtelSpanUtils

Left public on purpose:

  • CheckInUtils (@ApiStatus.Experimental crons helper)
  • SentryReactorUtils (documented reactor integration API)
  • deprecated Spring ReactorUtils (already @Deprecated; migration path to reactor utils)

Annotation-only — no package moves.

💡 Motivation and Context

Follow-up to #6016. Most of io.sentry.util was already @Internal; this finishes the unmarked SDK plumbing so a later major can relocate it without implying customer support.

💚 How did you test it?

  • ./gradlew :sentry:spotlessJavaApply :sentry:apiDump :sentry-jdbc:spotlessJavaApply :sentry-jdbc:apiDump :sentry-opentelemetry:sentry-opentelemetry-core:spotlessJavaApply :sentry-opentelemetry:sentry-opentelemetry-core:apiDump
  • :sentry-android-core spotless/apiDump not run here (no Android SDK); import order fixed manually on NativeEventUtils
  • .api dumps unchanged for :sentry (expected for Internal marks)

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

Next batch could mark docs-internal impl types (SentryClient, Scope/Scopes, json engine, etc.).

#skip-changelog

Requested by no.

--

View Junior Session [Sentry]

SDK utility helpers in io.sentry.util and a few module-local Utils are
plumbing, not public API. Mark them internal so a future major can move
them without implying customer support. Leave intentional public helpers
like CheckInUtils and SentryReactorUtils alone.

Co-Authored-By: Nelson Osacky <nelson.osacky@sentry.io>
@sentry

sentry Bot commented Aug 27, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.54.0 (1) release

⚙️ sentry-android Build Distribution Settings

@runningcode
runningcode marked this pull request as ready for review August 27, 2026 09:11
@runningcode runningcode added the sanity-check PR needs a lightweight review for obvious issues label Aug 28, 2026

@0xadam-brown 0xadam-brown left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this too 👍

Git history suggests that LoadClass and TracingUtils were made public so they could be consumed by our hybrid SDKs. We should probably exclude them from this PR.

My clanker didn't find any evidence that the same was true for the remaining classes, but I'm no expert on the history here – so feel free to check in with others if you're also unsure.

Exclude these from the Internal pass; git history suggests they were
kept public for hybrid SDK consumption.
@sentry-junior

sentry-junior Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Good catch — excluded LoadClass and TracingUtils from this PR and left them public for hybrid SDK consumers. Method-level @ApiStatus.Internal on some TracingUtils members is unchanged.

@0xadam-brown 0xadam-brown left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...I'm no expert on the history here – so feel free to check in with others if you're also unsure.

Approving with that^^ proviso, so feel free to check with others / dig deeper as needed. Otherwise, lgtm on its face.

@runningcode

Copy link
Copy Markdown
Contributor

jr did that automatically. I guess we can just go mark those later to unblock this PR.

IMO, we should have a separate marker for classes used by hybrid SDKs so that we don't make breaking changes to them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sanity-check PR needs a lightweight review for obvious issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants