Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/platforms/godot/user-feedback/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: Set Up User Feedback
sidebar_title: User Feedback
description: "Learn more about collecting user feedback when an event occurs. Sentry pairs the feedback with the original event, giving you additional insight into issues."
sidebar_order: 6000
---

Sentry makes it possible to collect user feedback, and optionally associate it with an error event.

## User Feedback API

The User Feedback API allows you to collect user feedback while using your own UI controls. You can submit feedback directly by creating an instance of `SentryFeedback` class, setting the required `message` and optional fields, then submitting it using `SentrySDK.capture_feedback(feedback)`.

```GDScript
var feedback := SentryFeedback.new()
feedback.message = "I'm stuck in the wall!"
feedback.contact_email = "[email protected]"
feedback.name = "Bob"
SentrySDK.capture_feedback(feedback)
```

Sentry can optionally pair this feedback with an event, giving you additional insight into issues. Sentry needs the `event_id` to be able to associate the user feedback to the corresponding event. For example, to get the `event_id`, you can use <PlatformLink to="/configuration/options/#before_send">before_send</PlatformLink>, or the return value of the method capturing an event.

```GDScript
var event_id = SentrySDK.capture_message("An event that will get user feedback.")
# ...
feedback.associated_event_id = event_id
```
Loading