Skip to content

feat: add debug, breadcrumbs, and user sub-APIs#8072

Open
philprime wants to merge 1 commit into
philprime/internal-api/sdk-skeletonfrom
philprime/internal-api/breadcrumbs
Open

feat: add debug, breadcrumbs, and user sub-APIs#8072
philprime wants to merge 1 commit into
philprime/internal-api/sdk-skeletonfrom
philprime/internal-api/breadcrumbs

Conversation

@philprime

Copy link
Copy Markdown
Member

Summary

  • Add three new sub-APIs to SentrySDK.internal: debug, breadcrumbs, and user
  • Each sub-API uses the Dependencies protocol pattern with provider injection via SentryDependencyContainer, matching the existing SentryInternalSdkApi design
  • Includes ObjC wrapper headers/classes (SentryObjC/SentryObjCCompat) and both Swift unit tests and ObjC integration tests

Details

debug — exposes images (all loaded debug images) and images(forAddresses:) (debug images for specific memory addresses) via DebugImageProvider and BinaryImageCacheProvider dependency injection.

breadcrumbsfromDictionary(_:) creates a Breadcrumb from a dictionary representation, injected via BreadcrumbDeserializerProvider.

userfromDictionary(_:) creates a User from a dictionary representation, injected via UserDeserializerProvider.

#skip-changelog

Test plan

  • make build-ios passes
  • make test-macos — 23 targeted tests, 0 failures
  • CI validates full test suite and ObjC compatibility

Add three new sub-APIs to SentrySDK.internal for hybrid SDK
consumption: debug (image access), breadcrumbs (dictionary
deserialization), and user (dictionary deserialization).

Each sub-API follows the Dependencies protocol pattern with
provider injection via SentryDependencyContainer, matching
the existing SentryInternalSdkApi design. Includes ObjC
wrapper headers/classes and Swift+ObjC integration tests.
@philprime philprime self-assigned this Jun 15, 2026
@philprime philprime added the ready-to-merge Use this label to trigger all PR workflows label Jun 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against e924575

@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 e924575. Configure here.

debugMeta.debugID = uuid
}
result.append(debugMeta)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing VM address in debug meta

Medium Severity

images(forAddresses:) builds DebugMeta manually and never sets imageVmAddress, unlike the sibling images property and SentryDebugImageProvider. Hybrid SDKs using address lookup can emit incomplete debug_meta, which can weaken Mach-O symbolication for stack frames.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e924575. Configure here.

@sentry

sentry Bot commented Jun 15, 2026

Copy link
Copy Markdown

📲 Install Builds

iOS

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

⚙️ sentry-cocoa Build Distribution Settings

@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.17544% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.582%. Comparing base (4ca09ec) to head (e924575).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...urces/Swift/HybridSDK/SentryInternalDebugApi.swift 55.555% 8 Missing ⚠️
.../SentryObjCCompat/SentryObjCInternalDebugApi.swift 0.000% 7 Missing ⚠️
...urces/SentryObjCCompat/SentryObjCInternalApi.swift 66.666% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                            Coverage Diff                            @@
##           philprime/internal-api/sdk-skeleton     #8072       +/-   ##
=========================================================================
- Coverage                               87.640%   87.582%   -0.059%     
=========================================================================
  Files                                      564       570        +6     
  Lines                                    32227     32284       +57     
  Branches                                 13186     13187        +1     
=========================================================================
+ Hits                                     28244     28275       +31     
- Misses                                    3936      3960       +24     
- Partials                                    47        49        +2     
Files with missing lines Coverage Δ
...ryObjCCompat/SentryObjCInternalBreadcrumbApi.swift 100.000% <100.000%> (ø)
...s/SentryObjCCompat/SentryObjCInternalUserApi.swift 100.000% <100.000%> (ø)
Sources/Swift/HybridSDK/SentryInternalApi.swift 100.000% <100.000%> (ø)
.../Swift/HybridSDK/SentryInternalBreadcrumbApi.swift 100.000% <100.000%> (ø)
...ources/Swift/HybridSDK/SentryInternalUserApi.swift 100.000% <100.000%> (ø)
Sources/Swift/SentryDependencyContainer.swift 97.095% <100.000%> (+0.074%) ⬆️
...urces/SentryObjCCompat/SentryObjCInternalApi.swift 80.000% <66.666%> (-20.000%) ⬇️
.../SentryObjCCompat/SentryObjCInternalDebugApi.swift 0.000% <0.000%> (ø)
...urces/Swift/HybridSDK/SentryInternalDebugApi.swift 55.555% <55.555%> (ø)

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ca09ec...e924575. Read the comment docs.

@github-actions

Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1228.89 ms 1266.64 ms 37.75 ms
Size 24.14 KiB 1.18 MiB 1.16 MiB

Baseline results on branch: philprime/internal-api/sdk-skeleton

Startup times

Revision Plain With Sentry Diff
a945106 1229.56 ms 1255.70 ms 26.14 ms

App size

Revision Plain With Sentry Diff
a945106 24.14 KiB 1.18 MiB 1.16 MiB

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

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant