chore(feedback): Update the samples with an attachment/tags example#4322
chore(feedback): Update the samples with an attachment/tags example#4322krystofwoldrich merged 25 commits intomaingetsentry/sentry-react-native:mainfrom antonis/3859-newCaptureFeedbackAPI-hintgetsentry/sentry-react-native:antonis/3859-newCaptureFeedbackAPI-hintCopy head branch name to clipboard
Conversation
| onDismiss(); | ||
|
|
||
| const base64Image = | ||
| 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/wcAAgUBA+kZYq8AAAAASUVORK5CYII='; |
There was a problem hiding this comment.
This is just an one pixel image. I avoided to add extra library dependencies to handle a real image attachment at this point for simplicity. This sample will be enhanced along with the capture feedback UI implementation #4302
There was a problem hiding this comment.
For simplicity avoiding extra lib is okay. I'm not sure if this will get correctly recognized in Sentry.
The data type is UInt8Array | string, but when string is used it's expected the string is the raw data.
There was a problem hiding this comment.
Let's check if the image is correctly processed if not, we can just bake in here the UInt8Array.
There was a problem hiding this comment.
This example is not working - the file attached on sentry is just a text file with base64
There was a problem hiding this comment.
Thank you for the feedback @radiodario 🙇
the file attached on sentry is just a text file with base64
That is true. We currently support only raw data attachments (updated code, User Feedback API documentation). In order to upload an image you need to pass a Uint8Array in the data field.
Alternatively you may Integrate with an Image Picker Library or Implementing the onAddScreenshot Callback.
Android (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 8900e1a+dirty | 430.68 ms | 456.13 ms | 25.44 ms |
| 07e58c9 | 495.04 ms | 489.73 ms | -5.31 ms |
| 9c48b2c | 349.24 ms | 385.96 ms | 36.72 ms |
| b1e8712 | 462.11 ms | 465.71 ms | 3.60 ms |
| b8ff156 | 438.80 ms | 454.14 ms | 15.34 ms |
| d0bf494+dirty | 375.37 ms | 395.14 ms | 19.77 ms |
| 416f465 | 446.96 ms | 454.22 ms | 7.26 ms |
| 8c88ac7 | 411.15 ms | 400.54 ms | -10.60 ms |
| 4cc5c27 | 460.04 ms | 496.32 ms | 36.28 ms |
| 0d3e677 | 422.82 ms | 411.90 ms | -10.92 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 8900e1a+dirty | 17.73 MiB | 19.75 MiB | 2.01 MiB |
| 07e58c9 | 17.74 MiB | 20.08 MiB | 2.34 MiB |
| 9c48b2c | 17.73 MiB | 19.80 MiB | 2.07 MiB |
| b1e8712 | 17.73 MiB | 19.75 MiB | 2.02 MiB |
| b8ff156 | 17.74 MiB | 20.09 MiB | 2.35 MiB |
| d0bf494+dirty | 17.73 MiB | 19.75 MiB | 2.02 MiB |
| 416f465 | 17.74 MiB | 20.09 MiB | 2.35 MiB |
| 8c88ac7 | 17.74 MiB | 20.08 MiB | 2.34 MiB |
| 4cc5c27 | 17.73 MiB | 19.95 MiB | 2.21 MiB |
| 0d3e677 | 17.74 MiB | 20.07 MiB | 2.34 MiB |
Previous results on branch: antonis/3859-newCaptureFeedbackAPI-hint
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 8ac9557 | 451.00 ms | 458.35 ms | 7.35 ms |
| 62848a1 | 414.23 ms | 406.08 ms | -8.15 ms |
| 14e0b04 | 423.13 ms | 420.63 ms | -2.50 ms |
| 1f082ae | 495.11 ms | 479.18 ms | -15.93 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 8ac9557 | 17.74 MiB | 20.09 MiB | 2.35 MiB |
| 62848a1 | 17.74 MiB | 20.09 MiB | 2.35 MiB |
| 14e0b04 | 17.74 MiB | 20.09 MiB | 2.35 MiB |
| 1f082ae | 17.74 MiB | 20.09 MiB | 2.35 MiB |
Android (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 27ef4ee+dirty | 296.71 ms | 351.00 ms | 54.29 ms |
| 8900e1a+dirty | 371.40 ms | 377.70 ms | 6.31 ms |
| 8de2810+dirty | 368.43 ms | 412.20 ms | 43.77 ms |
| 0db0c72+dirty | 335.20 ms | 351.06 ms | 15.86 ms |
| 52c0562+dirty | 401.23 ms | 435.65 ms | 34.42 ms |
| e5bc97b+dirty | 409.10 ms | 471.61 ms | 62.51 ms |
| d0bf494+dirty | 253.73 ms | 308.23 ms | 54.49 ms |
| 9c48b2c+dirty | 270.82 ms | 321.12 ms | 50.30 ms |
| d2c32bb+dirty | 445.45 ms | 497.85 ms | 52.41 ms |
| b95b8af+dirty | 392.94 ms | 428.00 ms | 35.06 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 27ef4ee+dirty | 7.15 MiB | 8.08 MiB | 959.49 KiB |
| 8900e1a+dirty | 7.15 MiB | 8.03 MiB | 901.79 KiB |
| 8de2810+dirty | 7.15 MiB | 8.35 MiB | 1.20 MiB |
| 0db0c72+dirty | 7.15 MiB | 8.04 MiB | 911.02 KiB |
| 52c0562+dirty | 7.15 MiB | 8.39 MiB | 1.24 MiB |
| e5bc97b+dirty | 7.15 MiB | 8.35 MiB | 1.20 MiB |
| d0bf494+dirty | 7.15 MiB | 8.04 MiB | 910.85 KiB |
| 9c48b2c+dirty | 7.15 MiB | 8.07 MiB | 947.16 KiB |
| d2c32bb+dirty | 7.15 MiB | 8.35 MiB | 1.20 MiB |
| b95b8af+dirty | 7.15 MiB | 8.38 MiB | 1.23 MiB |
Previous results on branch: antonis/3859-newCaptureFeedbackAPI-hint
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 62848a1+dirty | 388.18 ms | 445.96 ms | 57.78 ms |
| 14e0b04+dirty | 403.86 ms | 464.70 ms | 60.84 ms |
| 8ac9557+dirty | 408.89 ms | 441.19 ms | 32.29 ms |
| 1f082ae+dirty | 373.26 ms | 396.29 ms | 23.04 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 62848a1+dirty | 7.15 MiB | 8.37 MiB | 1.22 MiB |
| 14e0b04+dirty | 7.15 MiB | 8.37 MiB | 1.22 MiB |
| 8ac9557+dirty | 7.15 MiB | 8.37 MiB | 1.22 MiB |
| 1f082ae+dirty | 7.15 MiB | 8.37 MiB | 1.22 MiB |
lucas-zimerman
left a comment
There was a problem hiding this comment.
all looking good, thank you for the PR!
iOS (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| e5bc97b+dirty | 1230.63 ms | 1234.83 ms | 4.20 ms |
| 80b2ce3+dirty | 1265.92 ms | 1268.60 ms | 2.69 ms |
| d7401ac+dirty | 1252.38 ms | 1275.04 ms | 22.66 ms |
| b95b8af+dirty | 1221.39 ms | 1228.52 ms | 7.13 ms |
| e540498+dirty | 1220.61 ms | 1212.93 ms | -7.68 ms |
| f06c879+dirty | 1252.64 ms | 1259.66 ms | 7.02 ms |
| e5c9b8b+dirty | 1258.57 ms | 1267.32 ms | 8.75 ms |
| 5bb8d5f+dirty | 1235.47 ms | 1237.39 ms | 1.92 ms |
| acadc0f+dirty | 1264.38 ms | 1290.06 ms | 25.68 ms |
| c2a4e9b+dirty | 1240.10 ms | 1239.22 ms | -0.88 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| e5bc97b+dirty | 2.36 MiB | 3.10 MiB | 753.14 KiB |
| 80b2ce3+dirty | 2.36 MiB | 2.84 MiB | 486.98 KiB |
| d7401ac+dirty | 2.36 MiB | 2.83 MiB | 481.14 KiB |
| b95b8af+dirty | 2.36 MiB | 3.14 MiB | 793.32 KiB |
| e540498+dirty | 2.36 MiB | 3.14 MiB | 793.34 KiB |
| f06c879+dirty | 2.36 MiB | 2.88 MiB | 530.42 KiB |
| e5c9b8b+dirty | 2.36 MiB | 2.87 MiB | 520.43 KiB |
| 5bb8d5f+dirty | 2.36 MiB | 2.92 MiB | 570.22 KiB |
| acadc0f+dirty | 2.36 MiB | 2.83 MiB | 480.37 KiB |
| c2a4e9b+dirty | 2.36 MiB | 3.08 MiB | 734.00 KiB |
Previous results on branch: antonis/3859-newCaptureFeedbackAPI-hint
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 62848a1+dirty | 1239.90 ms | 1240.02 ms | 0.12 ms |
| 14e0b04+dirty | 1224.17 ms | 1232.15 ms | 7.98 ms |
| 8ac9557+dirty | 1226.52 ms | 1231.29 ms | 4.76 ms |
| 1f082ae+dirty | 1221.41 ms | 1218.83 ms | -2.57 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 62848a1+dirty | 2.36 MiB | 3.11 MiB | 759.85 KiB |
| 14e0b04+dirty | 2.36 MiB | 3.11 MiB | 759.92 KiB |
| 8ac9557+dirty | 2.36 MiB | 3.11 MiB | 759.80 KiB |
| 1f082ae+dirty | 2.36 MiB | 3.11 MiB | 759.91 KiB |
iOS (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| e5bc97b+dirty | 1229.17 ms | 1227.64 ms | -1.54 ms |
| 80b2ce3+dirty | 1245.12 ms | 1262.04 ms | 16.92 ms |
| d7401ac+dirty | 1288.10 ms | 1289.54 ms | 1.44 ms |
| b95b8af+dirty | 1235.60 ms | 1242.06 ms | 6.46 ms |
| e540498+dirty | 1254.92 ms | 1247.21 ms | -7.71 ms |
| f06c879+dirty | 1285.14 ms | 1285.86 ms | 0.72 ms |
| e5c9b8b+dirty | 1276.90 ms | 1280.92 ms | 4.02 ms |
| 5bb8d5f+dirty | 1215.04 ms | 1217.52 ms | 2.48 ms |
| acadc0f+dirty | 1271.12 ms | 1272.28 ms | 1.16 ms |
| c2a4e9b+dirty | 1247.39 ms | 1243.04 ms | -4.35 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| e5bc97b+dirty | 2.92 MiB | 3.66 MiB | 758.40 KiB |
| 80b2ce3+dirty | 2.92 MiB | 3.40 MiB | 492.75 KiB |
| d7401ac+dirty | 2.92 MiB | 3.40 MiB | 488.06 KiB |
| b95b8af+dirty | 2.92 MiB | 3.69 MiB | 794.16 KiB |
| e540498+dirty | 2.92 MiB | 3.69 MiB | 794.14 KiB |
| f06c879+dirty | 2.92 MiB | 3.44 MiB | 533.24 KiB |
| e5c9b8b+dirty | 2.92 MiB | 3.43 MiB | 524.50 KiB |
| 5bb8d5f+dirty | 2.92 MiB | 3.48 MiB | 575.85 KiB |
| acadc0f+dirty | 2.92 MiB | 3.39 MiB | 487.34 KiB |
| c2a4e9b+dirty | 2.92 MiB | 3.64 MiB | 739.91 KiB |
Previous results on branch: antonis/3859-newCaptureFeedbackAPI-hint
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 62848a1+dirty | 1237.10 ms | 1236.69 ms | -0.41 ms |
| 14e0b04+dirty | 1248.87 ms | 1236.32 ms | -12.56 ms |
| 8ac9557+dirty | 1242.49 ms | 1237.18 ms | -5.31 ms |
| 1f082ae+dirty | 1253.84 ms | 1246.77 ms | -7.07 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 62848a1+dirty | 2.92 MiB | 3.67 MiB | 772.41 KiB |
| 14e0b04+dirty | 2.92 MiB | 3.67 MiB | 772.40 KiB |
| 8ac9557+dirty | 2.92 MiB | 3.67 MiB | 772.31 KiB |
| 1f082ae+dirty | 2.92 MiB | 3.67 MiB | 772.49 KiB |
Co-authored-by: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com>
|
Thank you for splitting the PRs, it makes it clear and easy to review! |
|
Based on my review of #4320 This PR will boil down to only the sample app update. If I'm not mistaken. |
…ewCaptureFeedbackAPI-hint # Conflicts: # CHANGELOG.md # packages/core/src/js/client.ts # packages/core/src/js/sdk.tsx # packages/core/test/client.test.ts
True. Probably there is no need for this now. |
|
Just, one more nit about the changelog, otherwise it's good to be merged. |
# Conflicts: # CHANGELOG.md # samples/react-native-macos/src/components/UserFeedbackModal.tsx # samples/react-native/src/components/UserFeedbackModal.tsx
| onDismiss(); | ||
|
|
||
| const base64Image = | ||
| 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/wcAAgUBA+kZYq8AAAAASUVORK5CYII='; |
There was a problem hiding this comment.
Let's check if the image is correctly processed if not, we can just bake in here the UInt8Array.
|
Thank you for your feedback and for fixing the changelog @krystofwoldrich 🙇 |
📢 Type of change
📜 Description
Updates the sample app with an attachment/tags example
💡 Motivation and Context
Enhance the #4320 sample app with an attachment/tags example
💚 How did you test it?
CI, Manual testing with the sample app.
Screenshot
📝 Checklist
sendDefaultPIIis enabled🔮 Next steps
#skip-changelog