Skip to content

Commit

Permalink
feat(native): add user feedback feature description (#9512)
Browse files Browse the repository at this point in the history
* feat(native): add user feedback feature description

* Update docs/platforms/native/user-feedback/index.mdx

Co-authored-by: Liza Mock <lizka920@gmail.com>

* Update docs/platforms/native/user-feedback/index.mdx

Co-authored-by: Liza Mock <lizka920@gmail.com>

* Update docs/platforms/native/user-feedback/index.mdx

Co-authored-by: Liza Mock <lizka920@gmail.com>

---------

Co-authored-by: Liza Mock <lizka920@gmail.com>
  • Loading branch information
tustanivsky and lizokm authored Mar 28, 2024
1 parent 7eff62e commit 6df184e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/platforms/native/user-feedback/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Set Up User Feedback
description: "Learn how to view user feedback submissions which, paired with the original event, give you additional insight into issues."
sidebar_order: 6000
---

Sentry makes it possible to collect additional feedback when a user experiences an error. You can collect feedback according to the method supported by your SDK of choice.

## User Feedback API

The user feedback API allows you to collect user feedback using your own UI. You can use the same programming language you have in your app to then send the feedback. In this case, the SDK creates the HTTP request so you don't have to deal with posting data via HTTP.

Sentry pairs the feedback with the original event, giving you additional insight into issues. In order to do this, Sentry needs the `eventId`. For example, to get the `eventId`, you can use <PlatformLink to="/configuration/options/#before-send"><PlatformIdentifier name="before-send" /></PlatformLink> or the return value of the method capturing an event.

<PlatformContent includePath="user-feedback/sdk-api-example/" />

Alternatively, you can use the [User Feedback API endpoint](/api/projects/submit-user-feedback/) directly.
11 changes: 11 additions & 0 deletions platform-includes/user-feedback/sdk-api-example/native.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
```cpp
#include <sentry.h>

sentry_value_t event = sentry_value_new_message_event(
SENTRY_LEVEL_INFO, "my-logger", "Hello user feedback!");
sentry_uuid_t event_id = sentry_capture_event(event);

sentry_value_t user_feedback = sentry_value_new_user_feedback(
&event_id, "Jane", "jane.doe@example.com", "Feedback message");
sentry_capture_user_feedback(user_feedback);
```

0 comments on commit 6df184e

Please sign in to comment.