Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
🤖 This preview updates automatically when you update the PR. |
|
sentry-android-ndk/src/main/java/io/sentry/android/ndk/NdkScopeObserver.java
Show resolved
Hide resolved
…try/sentry-java into feat/sync-file-attachment
Sentry Build Distribution
|
| return; | ||
| } | ||
|
|
||
| final byte[] bytes = attachment.getBytes(); |
There was a problem hiding this comment.
there's also attachment.getByteProvider() which lazily evaluates and retrieves the bytes -- not sure if you want to support that from the gaming SDKs, but we use it when getting the bytes is heavy for the main thread, so it gets offloaded to the envelope serialization time on a bg thread, e.g.
There was a problem hiding this comment.
I think invoking the ByteProvider from inside the signal handler is going to be extremely risky. But I'll keep that in mind.
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 6405ec5 | 310.88 ms | 354.56 ms | 43.69 ms |
| d5a29b6 | 298.62 ms | 391.78 ms | 93.16 ms |
| f064536 | 329.00 ms | 395.62 ms | 66.62 ms |
| fcec2f2 | 357.47 ms | 447.32 ms | 89.85 ms |
| bbc35bb | 324.88 ms | 425.73 ms | 100.85 ms |
| 694d587 | 312.37 ms | 402.77 ms | 90.41 ms |
| b8bd880 | 314.56 ms | 336.50 ms | 21.94 ms |
| 889ecea | 367.58 ms | 437.52 ms | 69.94 ms |
| e2dce0b | 308.96 ms | 360.10 ms | 51.14 ms |
| 83884a0 | 334.46 ms | 400.92 ms | 66.46 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 6405ec5 | 1.58 MiB | 2.12 MiB | 552.23 KiB |
| d5a29b6 | 1.58 MiB | 2.12 MiB | 549.37 KiB |
| f064536 | 1.58 MiB | 2.20 MiB | 633.90 KiB |
| fcec2f2 | 1.58 MiB | 2.12 MiB | 551.50 KiB |
| bbc35bb | 1.58 MiB | 2.12 MiB | 553.01 KiB |
| 694d587 | 1.58 MiB | 2.19 MiB | 620.06 KiB |
| b8bd880 | 1.58 MiB | 2.29 MiB | 722.92 KiB |
| 889ecea | 1.58 MiB | 2.11 MiB | 539.75 KiB |
| e2dce0b | 0 B | 0 B | 0 B |
| 83884a0 | 1.58 MiB | 2.29 MiB | 722.97 KiB |
|
|
||
| ### Features | ||
|
|
||
| - Android: Attachments on the scope will now be synced to native ([#5211](https://github.com/getsentry/sentry-java/pull/5211)) |
There was a problem hiding this comment.
- 🚫 The changelog entry seems to be part of an already released section
## 8.37.1.
Consider moving the entry to the## Unreleasedsection, please.
📜 Description
Relies on getsentry/sentry-native#1584
Attachments added to the scope should get synced to
sentry-native. I.e. a Unity games hasand the game crashes, that attachment should be available in the resulting sentry event.
💡 Motivation and Context
Resolves #4758
💚 How did you test it?
Unit tests. Unity SDK will have e2e tests.
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
This needs to be used and implemented in the hybrid SDKs.
Adding support to sync
bytesas attachments.