Repository navigation
ref(core): [Hybrid SDK API 1] Mark the non-customer API that hybrid SDKs use - #6785
Draft
runningcode wants to merge 1 commit into
Draft
runningcode wants to merge 1 commit into
runningcode wants to merge 1 commit into
Conversation
Add a source-retention @HybridSdkApi marker and apply it to the Internal types and members, internal-package classes, and other non-customer entry points that React Native, Flutter, .NET, Unity, Unreal, Godot, KMP, and Capacitor call. A later Internal or v9 relocation pass can then tell hybrid-facing surface apart from pure SDK plumbing. Fixes JAVA-719 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
Contributor
PR risk: mediumFor commit Main concerns: reach, public contract. Rules that block low also fired:
This label is a hint for reviewers, not an approval. |
4 of 9 tasks
4 of 9 tasks
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.
PR Stack (Hybrid SDK API)
📜 Description
Adds
@HybridSdkApi, a source-retention marker with no attributes. It goes on non-customer API that a hybrid SDK uses:@ApiStatus.Internaltypes and members, classes ininternalpackages, and public entry points that only hybrids call, such as the 4-argReplayIntegrationconstructor. Customer-facing API is left unmarked, since semver already covers it.The list comes from the Android code of React Native, Flutter, .NET, Unity, Unreal, Godot, KMP, Capacitor, and Cordova on their current default branches.
Some of the marked elements are not obvious:
Breadcrumb,User,App, andGpu. Unity sets these through JNI by field name.PersistingScopeObserverandPersistingOptionsObserverfile names, andAndroidOptionsInitializer.getCacheDir. Unity reads the persisted scope from disk.DefaultAndroidEventProcessor. .NET finds it by class identity ingetEventProcessors().SpanContext.getParentSpanId(). It is@TestOnly, but .NET calls it in production.Not marked, because they are customer-facing or can't take an annotation: manifest keys, the generated
BuildConfig, and the declaration order of theSentryLevelandSentryLogLevelenums, which Unreal maps by ordinal.💡 Motivation and Context
@ApiStatus.Internaldoesn't distinguish hybrid-facing surface from plain SDK plumbing, so a later relocate or remove pass for v9 can break a hybrid without any compiler noticing. Several hybrids call these elements through bindings, JNI, or reflection by name.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
New hybrid-facing API should get the marker when it is added.
🤖 Generated with Claude Code
#skip-changelog