Skip to content

Conversation

@itaybre
Copy link
Contributor

@itaybre itaybre commented Oct 23, 2025

This PR adds a new method in PrivateSentrySDKOnly for SDKs which use our SDK can add a custom view hierarchy.

Fixes: #6491

@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

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

Generated by 🚫 dangerJS against ed5f84b

@codecov
Copy link

codecov bot commented Oct 23, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
3839 1 3838 51
View the top 1 failed test(s) by shortest run time
iOS_SwiftUI_UITests.FeedbackUITests::testWidgetDisplayInSwiftUIApp
Stack Traces | 0s run time
.../iOS-SwiftUI/iOS-SwiftUI-UITests/FeedbackUITests.swift:14 - Failed to get matching snapshots: Timed out while evaluating UI query.

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1191.10 ms 1216.51 ms 25.41 ms
Size 23.75 KiB 1.01 MiB 1016.25 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
7c7ac56 1225.90 ms 1250.22 ms 24.33 ms
134fbdf 1219.71 ms 1240.35 ms 20.64 ms
f92cfa9 1228.45 ms 1251.33 ms 22.88 ms
2ca8f2e 1207.08 ms 1235.58 ms 28.49 ms
75b23cd 1227.10 ms 1253.61 ms 26.51 ms
6ee4973 1228.42 ms 1252.26 ms 23.84 ms
25f4532 1203.28 ms 1240.71 ms 37.44 ms
d8ceea3 1234.15 ms 1263.92 ms 29.77 ms
be8375a 1212.65 ms 1239.72 ms 27.08 ms
b9c733a 1195.49 ms 1220.23 ms 24.74 ms

App size

Revision Plain With Sentry Diff
7c7ac56 23.75 KiB 902.49 KiB 878.74 KiB
134fbdf 23.75 KiB 875.25 KiB 851.50 KiB
f92cfa9 23.75 KiB 855.38 KiB 831.62 KiB
2ca8f2e 23.74 KiB 996.96 KiB 973.21 KiB
75b23cd 23.75 KiB 933.66 KiB 909.92 KiB
6ee4973 23.75 KiB 896.53 KiB 872.79 KiB
25f4532 23.75 KiB 969.27 KiB 945.52 KiB
d8ceea3 23.75 KiB 980.81 KiB 957.07 KiB
be8375a 23.75 KiB 933.03 KiB 909.28 KiB
b9c733a 23.74 KiB 1021.49 KiB 997.74 KiB

Previous results on branch: itay/view_hierarchy_downstream_2

Startup times

Revision Plain With Sentry Diff
331866b 1226.74 ms 1261.31 ms 34.57 ms

App size

Revision Plain With Sentry Diff
331866b 23.75 KiB 1.00 MiB 1005.94 KiB

Base automatically changed from itay/enable_private_only_tests to main October 23, 2025 20:53
Copy link
Contributor

@noahsmartin noahsmartin left a comment

Choose a reason for hiding this comment

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

Is it not entirely possible to achieve the same behavior today without adding to this private API? You can call SentrySDK.configureScope { ... } Wouldn't that allow the Godot SDK to do the same thing?

IMO we should try to have fewer hybrid SDK specific APIs, and move towards a version where anything that needs to be visible to an SDK should be part of the public API. So my suggestion is just to double check, do we really need to add an API for this?

@itaybre
Copy link
Contributor Author

itaybre commented Oct 23, 2025

Is it not entirely possible to achieve the same behavior today without adding to this private API? You can call SentrySDK.configureScope { ... } Wouldn't that allow the Godot SDK to do the same thing?

IMO we should try to have fewer hybrid SDK specific APIs, and move towards a version where anything that needs to be visible to an SDK should be part of the public API. So my suggestion is just to double check, do we really need to add an API for this?

The current blocker is SentryAttachment's attachmentType being private only

@noahsmartin
Copy link
Contributor

Makes sense thanks for explaining @itaybre Maybe we should make the attachment type property visible to hybrid SDKs, or visible to everyone? That way the extra logic that would never get called from regular users of the cocoa SDK doesn't have to be included in every native app and can instead be in the Godot repo, seems more scalable/better abstracted that way

@philipphofmann
Copy link
Member

Maybe we should make the attachment type property visible to hybrid SDKs, or visible to everyone?

We didn't decide on this yet, but I think we should come up with proper APIs also for hybrid. This visible only to hybrid only causes problems. We quite often break them. We should treat hybrid as any other SDK user. So IMO we should make the things they need public with a proper API and only change these APIs when doing a major.

@itaybre itaybre changed the title feat: Add view hierarchy attachment support for downstream SDKs feat: Expose attachment type on SentryAttachment Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose SentryAttachment's attachmentType for Internal SDKs

4 participants