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

Support captureFeedback #2230

Merged
merged 42 commits into from
Oct 10, 2024
Merged

Support captureFeedback #2230

merged 42 commits into from
Oct 10, 2024

Conversation

denrase
Copy link
Collaborator

@denrase denrase commented Aug 13, 2024

📜 Description

Implementation based on https://develop.sentry.dev/application/feedback-architecture/#feedback-events

💡 Motivation and Context

Relates to #1593

💚 How did you test it?

Unit tests

📝 Checklist

  • I reviewed submitted code
  • 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
  • All tests passing
  • No breaking changes

🔮 Next steps

  • How can i test if the sent envelope is correct/expected on the server side?
    • Envelope sent through native sdks
      • iOS
      • macOS
      • Android
    • Envelope sent through http

Copy link
Contributor

github-actions bot commented Aug 13, 2024

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

Generated by 🚫 dangerJS against 48bc130

Copy link

codecov bot commented Aug 13, 2024

Codecov Report

Attention: Patch coverage is 92.48555% with 13 lines in your changes missing coverage. Please review.

Project coverage is 85.08%. Comparing base (c3fc461) to head (48bc130).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...utter/lib/src/feedback/sentry_feedback_widget.dart 95.91% 4 Missing ⚠️
dart/lib/src/hub.dart 80.00% 2 Missing ⚠️
dart/lib/src/hub_adapter.dart 0.00% 2 Missing ⚠️
dart/lib/src/noop_hub.dart 0.00% 2 Missing ⚠️
dart/lib/src/protocol/contexts.dart 90.00% 1 Missing ⚠️
dart/lib/src/protocol/sentry_feedback.dart 96.87% 1 Missing ⚠️
dart/lib/src/sentry.dart 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2230      +/-   ##
==========================================
+ Coverage   84.43%   85.08%   +0.64%     
==========================================
  Files         248      241       -7     
  Lines        8811     8751      -60     
==========================================
+ Hits         7440     7446       +6     
+ Misses       1371     1305      -66     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Aug 13, 2024

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1233.77 ms 1248.47 ms 14.70 ms
Size 8.38 MiB 9.74 MiB 1.36 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
e8603bb 1240.85 ms 1254.79 ms 13.94 ms
f172c4d 1350.66 ms 1408.49 ms 57.83 ms
d5fb969 1228.79 ms 1256.17 ms 27.38 ms
f79eecf 1210.25 ms 1221.65 ms 11.40 ms
a609134 1254.50 ms 1265.08 ms 10.58 ms
f2db4ec 1244.14 ms 1259.79 ms 15.65 ms
24f71aa 1267.47 ms 1272.00 ms 4.53 ms
c3e6c82 1256.93 ms 1276.17 ms 19.24 ms
613760b 1263.10 ms 1277.27 ms 14.16 ms
636cb61 1266.06 ms 1271.38 ms 5.31 ms

App size

Revision Plain With Sentry Diff
e8603bb 8.33 MiB 9.40 MiB 1.07 MiB
f172c4d 8.33 MiB 9.62 MiB 1.29 MiB
d5fb969 8.33 MiB 9.64 MiB 1.31 MiB
f79eecf 8.29 MiB 9.36 MiB 1.07 MiB
a609134 8.16 MiB 9.16 MiB 1.01 MiB
f2db4ec 8.10 MiB 9.16 MiB 1.07 MiB
24f71aa 8.10 MiB 9.16 MiB 1.07 MiB
c3e6c82 8.32 MiB 9.38 MiB 1.06 MiB
613760b 8.15 MiB 9.13 MiB 1000.46 KiB
636cb61 8.28 MiB 9.34 MiB 1.06 MiB

Previous results on branch: feat/capture-feedback

Startup times

Revision Plain With Sentry Diff
34b2626 1263.36 ms 1287.91 ms 24.55 ms
3114a70 1226.08 ms 1253.48 ms 27.40 ms
d5c1f0d 1231.00 ms 1244.22 ms 13.22 ms
c86b10e 1254.92 ms 1269.71 ms 14.80 ms
eb98dd2 1242.64 ms 1263.37 ms 20.72 ms
4bb3ceb 1249.02 ms 1281.71 ms 32.69 ms
06a4a5f 1247.92 ms 1267.12 ms 19.21 ms

App size

Revision Plain With Sentry Diff
34b2626 8.38 MiB 9.73 MiB 1.36 MiB
3114a70 8.38 MiB 9.74 MiB 1.36 MiB
d5c1f0d 8.38 MiB 9.71 MiB 1.33 MiB
c86b10e 8.38 MiB 9.71 MiB 1.33 MiB
eb98dd2 8.38 MiB 9.74 MiB 1.36 MiB
4bb3ceb 8.38 MiB 9.71 MiB 1.33 MiB
06a4a5f 8.38 MiB 9.71 MiB 1.33 MiB

@ueman
Copy link
Collaborator

ueman commented Aug 13, 2024

I'm really looking forward to this, to use it in https://pub.dev/packages/feedback Thanks for tackling it!

@buenaflor
Copy link
Contributor

buenaflor commented Aug 13, 2024

@ueman on a side note, after this PR we are also looking into implementing the feedback widget

maybe it makes sense to adopt some code from your package? but let's see I haven't taken a deep dive yet into that

@denrase
Copy link
Collaborator Author

denrase commented Aug 13, 2024

@buenaflor I'm not sure if i have all the pieces in place that we need, would you mind taking a quick look over it and giving me feedback? /cc ueman

@ueman
Copy link
Collaborator

ueman commented Aug 13, 2024

@ueman on a side note, after this PR we are also looking into implementing the feedback widget

maybe it makes sense to adopt some code from your package? but let's see I haven't taken a deep dive yet into that

I would advise against using my package, at least as of know, as there are a couple of fundamental issues with it, that would require a lot of effort to fix. I would love to see those fixed though.

As for the (Sentry) feedback widget, there's already a very simple but working implementation at https://github.com/getsentry/sentry-dart/blob/main/flutter/example/lib/user_feedback_dialog.dart

With a bit of polishing (mainly around handling issues during sending the feedback, maybe UI adjustments), it should be quite easy to ship.

@buenaflor I'm not sure if i have all the pieces in place that we need, would you mind taking a quick look over it and giving me feedback? /cc ueman

Unfortunately, I also already failed once to implement this spec. So I'm afraid I can't really help here :/

@denrase
Copy link
Collaborator Author

denrase commented Aug 13, 2024

Ok, i can see the new feedback on sentry.io \o/

Bildschirmfoto 2024-08-13 um 16 45 21

@denrase
Copy link
Collaborator Author

denrase commented Aug 13, 2024

Seems to work fine on iOS, macOS and web. On Android i can see the envelope in Spotlight, but no new issue is appearing on sentry.io.

Bildschirmfoto 2024-08-13 um 17 32 01

Copy link
Contributor

github-actions bot commented Aug 19, 2024

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 913.39 ms 1033.52 ms 120.13 ms
Size 6.49 MiB 7.56 MiB 1.07 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
d301b11 337.96 ms 395.04 ms 57.08 ms
11fb408 320.10 ms 380.24 ms 60.14 ms
eb1a7c1 332.98 ms 381.55 ms 48.57 ms
9f9f94f 331.04 ms 368.92 ms 37.88 ms
0bed04d 382.15 ms 458.33 ms 76.18 ms
95d0636 301.46 ms 357.98 ms 56.52 ms
ebfead1 298.44 ms 374.28 ms 75.84 ms
4477d2e 392.75 ms 472.69 ms 79.94 ms
daa1b33 366.98 ms 451.59 ms 84.61 ms
824df58 436.68 ms 548.80 ms 112.12 ms

App size

Revision Plain With Sentry Diff
d301b11 6.06 MiB 7.09 MiB 1.03 MiB
11fb408 6.06 MiB 7.10 MiB 1.04 MiB
eb1a7c1 5.94 MiB 6.92 MiB 1005.76 KiB
9f9f94f 5.94 MiB 6.95 MiB 1.01 MiB
0bed04d 6.33 MiB 7.30 MiB 987.71 KiB
95d0636 6.16 MiB 7.14 MiB 1007.32 KiB
ebfead1 6.06 MiB 7.03 MiB 989.24 KiB
4477d2e 6.33 MiB 7.26 MiB 950.38 KiB
daa1b33 6.27 MiB 7.20 MiB 956.36 KiB
824df58 6.35 MiB 7.35 MiB 1021.71 KiB

Previous results on branch: feat/capture-feedback

Startup times

Revision Plain With Sentry Diff
eb98dd2 463.65 ms 521.66 ms 58.01 ms
c86b10e 432.18 ms 491.02 ms 58.84 ms
4bb3ceb 416.62 ms 421.69 ms 5.07 ms
34b2626 429.74 ms 486.14 ms 56.40 ms
3114a70 487.19 ms 536.04 ms 48.85 ms
06a4a5f 416.80 ms 480.00 ms 63.20 ms
d5c1f0d 484.33 ms 580.04 ms 95.71 ms

App size

Revision Plain With Sentry Diff
eb98dd2 6.49 MiB 7.56 MiB 1.07 MiB
c86b10e 6.52 MiB 7.59 MiB 1.06 MiB
4bb3ceb 6.52 MiB 7.59 MiB 1.06 MiB
34b2626 6.52 MiB 7.61 MiB 1.09 MiB
3114a70 6.49 MiB 7.55 MiB 1.07 MiB
06a4a5f 6.52 MiB 7.59 MiB 1.06 MiB
d5c1f0d 6.52 MiB 7.59 MiB 1.06 MiB

# Conflicts:
#	dart/test/sentry_client_test.dart
@denrase
Copy link
Collaborator Author

denrase commented Sep 5, 2024

@aliu39 @buenaflor Still not seeing Feedback from Android. Web works, so the client should be doing everything as expected.

Bildschirmfoto 2024-09-05 um 10 16 30

@buenaflor
Copy link
Contributor

@aliu39 we believe its most likely an SDK internal issue, we'll investigate it

@denrase
Copy link
Collaborator Author

denrase commented Sep 11, 2024

@buenaflor Waiting for getsentry/sentry-java#3687

@denrase
Copy link
Collaborator Author

denrase commented Sep 17, 2024

@buenaflor getsentry/sentry-java#3687 was merged. Waiting for it beeing released, then we can finish here.

@ueman
Copy link
Collaborator

ueman commented Sep 18, 2024

Can't this be already merged? I mean the code works, and the Android dependency will be updated anyway as soon as it's release right?

@denrase
Copy link
Collaborator Author

denrase commented Sep 23, 2024

@ueman Think we could, but then we'd potentially block releases if Android takes longer than expected, no?

@denrase
Copy link
Collaborator Author

denrase commented Sep 23, 2024

@buenaflor What do you think? Should we merge this with the info that Android support will come later? Would be easier, as i have to merge in main every other day and fixing issues that arise.

@buenaflor
Copy link
Contributor

buenaflor commented Sep 25, 2024

@denrase I'll do a release soon, either today or tomorrow, we can merge it afterwards so we can wait for the android release

@buenaflor
Copy link
Contributor

buenaflor commented Oct 10, 2024

just tested and android works fine after bumping to Android 7.15.0👍

will merge after tests are green

@buenaflor buenaflor merged commit 0880a97 into main Oct 10, 2024
133 checks passed
@buenaflor buenaflor deleted the feat/capture-feedback branch October 10, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants