-
-
Notifications
You must be signed in to change notification settings - Fork 199
feat: implement the new User Feedback API #1304
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4c2fccf
feat: implement the new User Feedback API
jpnurmi d3de644
Fix heap-use-after-free
jpnurmi 0feda42
Update CHANGELOG.md
jpnurmi 0bb0f3f
remove unused line3_end
jpnurmi 581b017
what if we reused the old API?
jpnurmi 5ac15ef
use internal id to fix event association in Sentry Web UI
jpnurmi e3ac170
restore integration test for legacy user report
jpnurmi 3986c5b
convert a deprecated "user report" to a new "user feedback"
jpnurmi 36ce410
conversion: note in docs & log info message
jpnurmi 1be41ae
let sentry__envelope_add_user_feedback take ownership
jpnurmi be006dc
revert back to option 1
jpnurmi e095276
Merge remote-tracking branch 'upstream/master' into feat/new-feedback…
jpnurmi e618388
deprecate sentry_value_new_user_feedback() & sentry_capture_user_feed…
jpnurmi 90a10e1
fix remaining deprecation warnings
jpnurmi 80f1f61
msvc
jpnurmi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1350,9 +1350,11 @@ sentry_value_t | |
| sentry_value_new_user_feedback(const sentry_uuid_t *uuid, const char *name, | ||
| const char *email, const char *comments) | ||
| { | ||
| SENTRY_SUPPRESS_DEPRECATED | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. GCC and Clang allow calling a deprecated function in the same compilation unit, but MSVC throws a warning |
||
| return sentry_value_new_user_feedback_n(uuid, name, | ||
| sentry__guarded_strlen(name), email, sentry__guarded_strlen(email), | ||
| comments, sentry__guarded_strlen(comments)); | ||
| SENTRY_RESTORE_DEPRECATED | ||
| } | ||
|
|
||
| sentry_value_t | ||
|
|
@@ -1380,6 +1382,42 @@ sentry_value_new_user_feedback_n(const sentry_uuid_t *uuid, const char *name, | |
| return rv; | ||
| } | ||
|
|
||
| sentry_value_t | ||
| sentry_value_new_feedback(const char *message, const char *contact_email, | ||
| const char *name, const sentry_uuid_t *associated_event_id) | ||
| { | ||
| return sentry_value_new_feedback_n(message, sentry__guarded_strlen(message), | ||
| contact_email, sentry__guarded_strlen(contact_email), name, | ||
| sentry__guarded_strlen(name), associated_event_id); | ||
| } | ||
|
|
||
| sentry_value_t | ||
| sentry_value_new_feedback_n(const char *message, size_t message_len, | ||
| const char *contact_email, size_t contact_email_len, const char *name, | ||
| size_t name_len, const sentry_uuid_t *associated_event_id) | ||
| { | ||
| sentry_value_t rv = sentry_value_new_object(); | ||
|
|
||
| if (message) { | ||
| sentry_value_set_by_key( | ||
| rv, "message", sentry_value_new_string_n(message, message_len)); | ||
| } | ||
| if (contact_email) { | ||
| sentry_value_set_by_key(rv, "contact_email", | ||
| sentry_value_new_string_n(contact_email, contact_email_len)); | ||
| } | ||
| if (name) { | ||
| sentry_value_set_by_key( | ||
| rv, "name", sentry_value_new_string_n(name, name_len)); | ||
| } | ||
| if (associated_event_id) { | ||
| sentry_value_set_by_key(rv, "associated_event_id", | ||
| sentry__value_new_internal_uuid(associated_event_id)); | ||
| } | ||
|
|
||
| return rv; | ||
| } | ||
|
|
||
| static sentry_value_t | ||
| sentry__get_or_insert_values_list(sentry_value_t parent, const char *key) | ||
| { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.