Skip to content

ref(api)!: Remove legacy hybrid SDK facade - #8909

Draft
philprime wants to merge 6 commits into
mainfrom
philprime/remove-private-sdk-api
Draft

ref(api)!: Remove legacy hybrid SDK facade#8909
philprime wants to merge 6 commits into
mainfrom
philprime/remove-private-sdk-api

Conversation

@philprime

@philprime philprime commented Sep 1, 2026

Copy link
Copy Markdown
Member

Description

Remove PrivateSentrySDKOnly completely now that supported hybrid SDKs use SentrySDK.internal and Objective-C consumers use SentryObjCSDK.internal. The legacy header, implementation, Objective-C runtime symbol, build references, dedicated tests, and test-plan entries are gone.

Implementation

  • Centralize app-start callbacks and hybrid-mode state in SentrySDKInternal, with the structured app-start and performance APIs using that shared state.
  • Move the remaining app-start serialization behavior into SentryInternalAppStartApi and use the structured internal APIs at SDK and test call sites.
  • Keep SentryObjCPrivateSDKOnly as an independent SentryObjC compatibility surface, but delegate it directly to SentrySDK.internal rather than the removed class.
  • Remove the legacy class from generated Sentry API snapshots and internalize supporting profiling headers.
  • Reduce SENTRY-INTERNAL-API.md to an entry-point, source-navigation, architecture, and test-location guide instead of duplicating API declarations or migration history.

This intentionally removes the unsupported PrivateSentrySDKOnly source and runtime compatibility surface. All supported React Native, Flutter, .NET, and Unity integrations have migrated to the structured APIs.

#skip-changelog

Validation

  • make format
  • make analyze
  • make generate-public-api
  • make build-ios FOR_AGENTS=true
  • make build-macos FOR_AGENTS=true
  • make test-ios FOR_AGENTS=true, including 5,632 Sentry tests and 971 SentryV10 tests with zero failures

Local sample validation could not complete because the XCFramework sample artifacts were absent and the source sample encountered a stale duplicate-module cache conflict before compiling the changed sample source.

Checklist

  • 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 supported 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.
  • If I added a new public API, I also added it to the SentryObjC wrapper.

Closes #8908

@philprime philprime self-assigned this Sep 1, 2026
@philprime philprime added the run-full-ci Allows gated GitHub Action workflows to run for a labelled pull request label Sep 1, 2026
Move PrivateSentrySDKOnly out of public framework headers after hybrid SDKs migrated to SentrySDK.internal.

Inline remaining internal access paths and regenerate the public API definitions.
@philprime
philprime force-pushed the philprime/remove-private-sdk-api branch from 8b6a4b3 to 7e53dc2 Compare September 1, 2026 11:21
@sentry

sentry Bot commented Sep 1, 2026

Copy link
Copy Markdown

📲 Install Builds

iOS

🔗 App Name App ID Version Configuration
SDK-Size io.sentry.sample.SDK-Size 9.27.0 (1) Release

⚙️ sentry-cocoa Build Distribution Settings

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1238.71 ms 1263.40 ms 24.70 ms
Size 24.14 KiB 1.31 MiB 1.29 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
fc4e913 1231.79 ms 1267.89 ms 36.11 ms
6f28fd8 1229.98 ms 1271.73 ms 41.75 ms
a7c42d9 1217.25 ms 1253.98 ms 36.73 ms
230cc86 1225.33 ms 1258.67 ms 33.34 ms
5556249 1208.87 ms 1246.60 ms 37.72 ms
8ed81c1 1227.47 ms 1249.24 ms 21.77 ms
92fada5 1217.60 ms 1252.89 ms 35.30 ms
6d9f89d 1226.37 ms 1260.94 ms 34.57 ms
318f8af 1213.09 ms 1246.21 ms 33.13 ms
01ffe09 1208.52 ms 1240.94 ms 32.42 ms

App size

Revision Plain With Sentry Diff
fc4e913 24.14 KiB 1.17 MiB 1.15 MiB
6f28fd8 24.14 KiB 1.30 MiB 1.28 MiB
a7c42d9 24.14 KiB 1.15 MiB 1.13 MiB
230cc86 24.14 KiB 1.25 MiB 1.23 MiB
5556249 24.14 KiB 1.29 MiB 1.27 MiB
8ed81c1 24.14 KiB 1.23 MiB 1.21 MiB
92fada5 24.14 KiB 1.17 MiB 1.15 MiB
6d9f89d 24.14 KiB 1.26 MiB 1.23 MiB
318f8af 24.14 KiB 1.30 MiB 1.28 MiB
01ffe09 24.14 KiB 1.29 MiB 1.27 MiB

Previous results on branch: philprime/remove-private-sdk-api

Startup times

Revision Plain With Sentry Diff
5519155 1234.87 ms 1267.30 ms 32.43 ms
9b5a8b4 1220.10 ms 1263.90 ms 43.80 ms
1a8fbc1 1209.24 ms 1246.44 ms 37.19 ms
29c45c5 1230.60 ms 1264.31 ms 33.71 ms

App size

Revision Plain With Sentry Diff
5519155 24.14 KiB 1.31 MiB 1.29 MiB
9b5a8b4 24.14 KiB 1.31 MiB 1.29 MiB
1a8fbc1 24.14 KiB 1.32 MiB 1.29 MiB
29c45c5 24.14 KiB 1.31 MiB 1.29 MiB

@philprime
philprime marked this pull request as ready for review September 4, 2026 09:19
@philprime
philprime marked this pull request as draft September 4, 2026 09:26
Delete PrivateSentrySDKOnly after supported hybrid SDKs migrated to the structured internal API. Update tests and maintainer guidance to use the current entry points directly.
@philprime philprime changed the title ref(api)!: Internalize hybrid SDK compatibility ref(api)!: Remove legacy hybrid SDK facade Sep 4, 2026
@philprime
philprime marked this pull request as ready for review September 4, 2026 09:41
…ate-sdk-api

# Conflicts:
#	Tests/SentryTests/PrivateSentrySDKOnlyTests.swift
Comment thread Sources/Swift/HybridSDK/SentryInternalProfilingApi.swift Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a1d51d7. Configure here.

Comment thread Sources/Swift/HybridSDK/SentryInternalAppStartApi.swift
@philprime
philprime marked this pull request as draft September 4, 2026 12:50
@github-actions github-actions Bot removed the approved label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-full-ci Allows gated GitHub Action workflows to run for a labelled pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove PrivateSentrySDKOnly from public API

2 participants