Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(2.4) Feedback form attachments #4338

Open
wants to merge 14 commits into
base: antonis/3859-newCaptureFeedbackAPI-Form
Choose a base branch
from

Conversation

antonis
Copy link
Collaborator

@antonis antonis commented Dec 3, 2024

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

Based on #4328

📜 Description

This PR adds attachment handling in the SDK capture feedback form leaving the image picking to be implemented on the client:

Note that string attachments are converted to UInt8Array before sending to the server.

Android iOS

💡 Motivation and Context

Fixes #4337

💚 How did you test it?

CI, Manual testing (example)

📝 Checklist

  • I added tests to verify 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.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

As discussed we will use the no props configuration in the changelog.

Copy link
Contributor

github-actions bot commented Dec 3, 2024

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 389.80 ms 387.00 ms -2.80 ms
Size 17.74 MiB 20.10 MiB 2.36 MiB

Baseline results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

Revision Plain With Sentry Diff
27e1bf3 463.19 ms 478.80 ms 15.61 ms
0781f75 452.32 ms 457.22 ms 4.91 ms
a3ba405 438.16 ms 435.78 ms -2.38 ms
a06f6ba 424.02 ms 415.82 ms -8.20 ms
d33790a 442.93 ms 439.94 ms -3.00 ms
561640f 461.96 ms 458.11 ms -3.85 ms
cadf235 462.20 ms 463.34 ms 1.14 ms
26fc306 426.80 ms 421.58 ms -5.22 ms
50c70c0 496.82 ms 526.02 ms 29.20 ms

App size

Revision Plain With Sentry Diff
27e1bf3 17.74 MiB 20.09 MiB 2.35 MiB
0781f75 17.74 MiB 20.09 MiB 2.35 MiB
a3ba405 17.74 MiB 20.09 MiB 2.35 MiB
a06f6ba 17.74 MiB 20.09 MiB 2.35 MiB
d33790a 17.74 MiB 20.10 MiB 2.36 MiB
561640f 17.74 MiB 20.09 MiB 2.35 MiB
cadf235 17.74 MiB 20.09 MiB 2.35 MiB
26fc306 17.74 MiB 20.09 MiB 2.35 MiB
50c70c0 17.74 MiB 20.10 MiB 2.36 MiB

Previous results on branch: antonis/3959-captureFeedback-attachements

Startup times

Revision Plain With Sentry Diff
310cd89 465.17 ms 455.35 ms -9.82 ms
d0b75a7 410.94 ms 400.26 ms -10.68 ms
86c8c80 493.71 ms 495.57 ms 1.86 ms
6ffb17d 463.87 ms 457.83 ms -6.04 ms

App size

Revision Plain With Sentry Diff
310cd89 17.74 MiB 20.10 MiB 2.36 MiB
d0b75a7 17.74 MiB 20.09 MiB 2.35 MiB
86c8c80 17.74 MiB 20.09 MiB 2.35 MiB
6ffb17d 17.74 MiB 20.09 MiB 2.35 MiB

Copy link
Contributor

github-actions bot commented Dec 3, 2024

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 385.10 ms 441.10 ms 56.00 ms
Size 7.15 MiB 8.38 MiB 1.23 MiB

Baseline results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

Revision Plain With Sentry Diff
26fc306+dirty 382.83 ms 435.31 ms 52.48 ms
cadf235+dirty 455.51 ms 451.64 ms -3.87 ms
a06f6ba+dirty 381.50 ms 429.77 ms 48.27 ms
a3ba405+dirty 359.67 ms 436.86 ms 77.19 ms
d33790a+dirty 404.87 ms 473.06 ms 68.19 ms
27e1bf3+dirty 398.69 ms 439.39 ms 40.69 ms
0781f75+dirty 406.72 ms 454.80 ms 48.08 ms
e0624b6+dirty 359.30 ms 397.94 ms 38.64 ms
561640f+dirty 378.73 ms 442.25 ms 63.52 ms
50c70c0+dirty 385.30 ms 433.06 ms 47.76 ms

App size

Revision Plain With Sentry Diff
26fc306+dirty 7.15 MiB 8.37 MiB 1.22 MiB
cadf235+dirty 7.15 MiB 8.37 MiB 1.22 MiB
a06f6ba+dirty 7.15 MiB 8.37 MiB 1.22 MiB
a3ba405+dirty 7.15 MiB 8.37 MiB 1.22 MiB
d33790a+dirty 7.15 MiB 8.38 MiB 1.23 MiB
27e1bf3+dirty 7.15 MiB 8.37 MiB 1.22 MiB
0781f75+dirty 7.15 MiB 8.37 MiB 1.22 MiB
e0624b6+dirty 7.15 MiB 8.38 MiB 1.23 MiB
561640f+dirty 7.15 MiB 8.37 MiB 1.22 MiB
50c70c0+dirty 7.15 MiB 8.38 MiB 1.23 MiB

Previous results on branch: antonis/3959-captureFeedback-attachements

Startup times

Revision Plain With Sentry Diff
310cd89+dirty 412.29 ms 459.15 ms 46.86 ms
86c8c80+dirty 392.53 ms 440.91 ms 48.38 ms
d0b75a7+dirty 410.40 ms 428.56 ms 18.16 ms
6ffb17d+dirty 357.81 ms 416.39 ms 58.58 ms

App size

Revision Plain With Sentry Diff
310cd89+dirty 7.15 MiB 8.38 MiB 1.23 MiB
86c8c80+dirty 7.15 MiB 8.37 MiB 1.22 MiB
d0b75a7+dirty 7.15 MiB 8.37 MiB 1.22 MiB
6ffb17d+dirty 7.15 MiB 8.37 MiB 1.22 MiB

Copy link
Contributor

github-actions bot commented Dec 3, 2024

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1227.60 ms 1232.29 ms 4.69 ms
Size 2.36 MiB 3.11 MiB 761.56 KiB

Baseline results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

Revision Plain With Sentry Diff
27e1bf3+dirty 1230.92 ms 1232.33 ms 1.41 ms
d33790a+dirty 1234.19 ms 1231.76 ms -2.43 ms
561640f+dirty 1220.45 ms 1227.02 ms 6.57 ms
cadf235+dirty 1223.89 ms 1236.22 ms 12.33 ms
26fc306+dirty 1227.25 ms 1225.85 ms -1.40 ms
0781f75+dirty 1222.19 ms 1222.11 ms -0.08 ms
a3ba405+dirty 1223.00 ms 1219.06 ms -3.94 ms
a06f6ba+dirty 1230.45 ms 1227.09 ms -3.36 ms
e0624b6+dirty 1221.86 ms 1226.42 ms 4.57 ms
50c70c0+dirty 1228.06 ms 1224.43 ms -3.64 ms

App size

Revision Plain With Sentry Diff
27e1bf3+dirty 2.36 MiB 3.11 MiB 761.03 KiB
d33790a+dirty 2.36 MiB 3.11 MiB 761.06 KiB
561640f+dirty 2.36 MiB 3.11 MiB 761.19 KiB
cadf235+dirty 2.36 MiB 3.11 MiB 761.47 KiB
26fc306+dirty 2.36 MiB 3.11 MiB 761.18 KiB
0781f75+dirty 2.36 MiB 3.11 MiB 761.35 KiB
a3ba405+dirty 2.36 MiB 3.11 MiB 760.99 KiB
a06f6ba+dirty 2.36 MiB 3.11 MiB 761.35 KiB
e0624b6+dirty 2.36 MiB 3.11 MiB 761.16 KiB
50c70c0+dirty 2.36 MiB 3.11 MiB 760.92 KiB

Previous results on branch: antonis/3959-captureFeedback-attachements

Startup times

Revision Plain With Sentry Diff
310cd89+dirty 1224.53 ms 1237.12 ms 12.59 ms
86c8c80+dirty 1229.63 ms 1225.81 ms -3.82 ms
d0b75a7+dirty 1231.45 ms 1235.71 ms 4.27 ms
6ffb17d+dirty 1243.90 ms 1241.52 ms -2.38 ms

App size

Revision Plain With Sentry Diff
310cd89+dirty 2.36 MiB 3.11 MiB 761.42 KiB
86c8c80+dirty 2.36 MiB 3.11 MiB 761.21 KiB
d0b75a7+dirty 2.36 MiB 3.11 MiB 761.55 KiB
6ffb17d+dirty 2.36 MiB 3.11 MiB 761.85 KiB

Copy link
Contributor

github-actions bot commented Dec 3, 2024

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1235.69 ms 1242.08 ms 6.39 ms
Size 2.92 MiB 3.67 MiB 774.09 KiB

Baseline results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

Revision Plain With Sentry Diff
27e1bf3+dirty 1245.78 ms 1244.38 ms -1.40 ms
d33790a+dirty 1247.14 ms 1242.86 ms -4.28 ms
561640f+dirty 1237.10 ms 1229.59 ms -7.51 ms
cadf235+dirty 1225.19 ms 1231.65 ms 6.47 ms
26fc306+dirty 1229.10 ms 1227.88 ms -1.22 ms
0781f75+dirty 1247.90 ms 1237.11 ms -10.79 ms
a3ba405+dirty 1229.31 ms 1228.16 ms -1.14 ms
a06f6ba+dirty 1235.31 ms 1238.76 ms 3.45 ms
e0624b6+dirty 1229.19 ms 1232.18 ms 3.00 ms
50c70c0+dirty 1226.61 ms 1225.02 ms -1.59 ms

App size

Revision Plain With Sentry Diff
27e1bf3+dirty 2.92 MiB 3.67 MiB 773.54 KiB
d33790a+dirty 2.92 MiB 3.67 MiB 773.59 KiB
561640f+dirty 2.92 MiB 3.67 MiB 773.72 KiB
cadf235+dirty 2.92 MiB 3.67 MiB 773.97 KiB
26fc306+dirty 2.92 MiB 3.67 MiB 773.77 KiB
0781f75+dirty 2.92 MiB 3.67 MiB 773.83 KiB
a3ba405+dirty 2.92 MiB 3.67 MiB 773.65 KiB
a06f6ba+dirty 2.92 MiB 3.67 MiB 773.87 KiB
e0624b6+dirty 2.92 MiB 3.67 MiB 773.62 KiB
50c70c0+dirty 2.92 MiB 3.67 MiB 773.48 KiB

Previous results on branch: antonis/3959-captureFeedback-attachements

Startup times

Revision Plain With Sentry Diff
310cd89+dirty 1231.53 ms 1228.13 ms -3.41 ms
86c8c80+dirty 1237.06 ms 1234.31 ms -2.76 ms
d0b75a7+dirty 1246.12 ms 1240.60 ms -5.52 ms
6ffb17d+dirty 1237.81 ms 1245.38 ms 7.57 ms

App size

Revision Plain With Sentry Diff
310cd89+dirty 2.92 MiB 3.67 MiB 773.96 KiB
86c8c80+dirty 2.92 MiB 3.67 MiB 773.74 KiB
d0b75a7+dirty 2.92 MiB 3.67 MiB 774.05 KiB
6ffb17d+dirty 2.92 MiB 3.67 MiB 774.33 KiB

@antonis
Copy link
Collaborator Author

antonis commented Dec 3, 2024

Hey @krystofwoldrich, @lucas-zimerman 👋

though this PR is still draft (trying to figure out why images are not uploaded correctly) I'd like your feedback since my approach might be a bit opinionated.
To avoid adding a library in Sentry core (and issues with hooks) I've left the actual image picking on the client app:

Wdyt of this approach? Should the library offer the full functionality or leave it to the sample app 🙇

@antonis
Copy link
Collaborator Author

antonis commented Dec 3, 2024

trying to figure out why images are not uploaded correctly

I wasn't able to correctly upload a base64 image string thus I always convert to Uint8Array before sending.

@antonis antonis marked this pull request as ready for review December 3, 2024 14:23
@antonis antonis marked this pull request as draft December 10, 2024 11:34
@antonis
Copy link
Collaborator Author

antonis commented Dec 10, 2024

Converting to draft similar to #4328 (comment)

…959-captureFeedback-attachements

# Conflicts:
#	CHANGELOG.md
#	packages/core/src/js/feedback/FeedbackFormScreen.tsx
#	packages/core/src/js/feedback/FeedbackFormScreen.types.ts
#	packages/core/test/feedback/FeedbackFormScreen.test.tsx
#	samples/react-native/src/App.tsx
@antonis antonis marked this pull request as ready for review December 12, 2024 12:56
@antonis antonis linked an issue Dec 13, 2024 that may be closed by this pull request
@krystofwoldrich krystofwoldrich changed the title Feedback form attachments (2.4) Feedback form attachments Dec 13, 2024
…959-captureFeedback-attachements

# Conflicts:
#	packages/core/src/js/feedback/FeedbackForm.tsx
#	packages/core/src/js/feedback/defaults.ts
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.

Add attachment/screenshot handling in the feedback form UI
1 participant