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

feat: Manually capturing user feedback #559

Merged
merged 5 commits into from
Oct 29, 2020

Conversation

lucas-zimerman
Copy link
Collaborator

Based on getsentry/sentry-cocoa#805

This PR implements the CaptureUserFeedback so users can associate user feedback to an event.

Fixes #153

@lucas-zimerman
Copy link
Collaborator Author

🤔 Should I edit the changelog?

Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

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

Thanks for contributing again Lucas! I left a few comments.

src/Sentry/ISentryClient.cs Outdated Show resolved Hide resolved
src/Sentry/Protocol/SentryUserFeedback.cs Outdated Show resolved Hide resolved
src/Sentry/SentryClient.cs Outdated Show resolved Hide resolved
src/Sentry/SentrySdk.cs Outdated Show resolved Hide resolved
test/Sentry.Tests/SentryClientTests.cs Outdated Show resolved Hide resolved
test/Sentry.Tests/SentryClientTests.cs Outdated Show resolved Hide resolved
src/Sentry/ISentryClient.cs Outdated Show resolved Hide resolved
@bruno-garcia
Copy link
Member

🤔 Should I edit the changelog?

Yes please

…lock from sentryclient, renamed sentryuserfeedback) and added more unit tests.
@codecov-io
Copy link

codecov-io commented Oct 28, 2020

Codecov Report

Merging #559 into main will decrease coverage by 0.21%.
The diff coverage is 73.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #559      +/-   ##
==========================================
- Coverage   85.06%   84.85%   -0.22%     
==========================================
  Files         142      143       +1     
  Lines        3462     3513      +51     
  Branches      775      784       +9     
==========================================
+ Hits         2945     2981      +36     
- Misses        310      323      +13     
- Partials      207      209       +2     
Impacted Files Coverage Δ
src/Sentry/Extensibility/DisabledHub.cs 93.33% <0.00%> (-6.67%) ⬇️
src/Sentry/Extensibility/HubAdapter.cs 91.30% <0.00%> (-4.16%) ⬇️
src/Sentry/Internal/Hub.cs 51.35% <0.00%> (-4.54%) ⬇️
src/Sentry/SentrySdk.cs 93.02% <0.00%> (-4.54%) ⬇️
src/Sentry/SentryClient.cs 77.77% <68.75%> (-2.69%) ⬇️
src/Sentry/Protocol/Envelope.cs 97.14% <100.00%> (+0.98%) ⬆️
src/Sentry/Protocol/EnvelopeItem.cs 63.93% <100.00%> (+3.22%) ⬆️
src/Sentry/Protocol/UserFeedback.cs 100.00% <100.00%> (ø)
src/Sentry/SentryClientExtensions.cs 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5259ffd...6b628aa. Read the comment docs.

@lucas-zimerman
Copy link
Collaborator Author

lucas-zimerman commented Oct 28, 2020

weird, the test worked fine on my computer.
@bruno-garcia I have added the following public callback to SentrySdk because there's a test that enforces me to have all defined SentryClientExtensions also defined into SentrySdk

public static void CaptureUserFeedback(SentryId eventId, string email, string comments, string? name = null)

EDIT:
https://github.com/getsentry/sentry-dotnet/projects/3#card-46143120
and
https://github.com/getsentry/sentry-dotnet/projects/3#card-46044826
could be In progress

Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

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

Almost there! Left a couple notes.
Thanks!

src/Sentry/Protocol/UserFeedback.cs Outdated Show resolved Hide resolved
src/Sentry/SentryClient.cs Outdated Show resolved Hide resolved
test/Sentry.Tests/SentryClientTests.cs Outdated Show resolved Hide resolved
test/Sentry.Tests/SentryClientTests.cs Outdated Show resolved Hide resolved
Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

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

Beautiful stuff!! Thanks a lot @lucas-zimerman

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.

User Feedback
3 participants