Skip to content

Commit e210ee9

Browse files
authored
docs(Godot): User feedback API (#15225)
1 parent 1524e8a commit e210ee9

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Set Up User Feedback
3+
sidebar_title: User Feedback
4+
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."
5+
sidebar_order: 6000
6+
---
7+
8+
Sentry makes it possible to collect user feedback, and optionally associate it with an error event.
9+
10+
## User Feedback API
11+
12+
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)`.
13+
14+
```GDScript
15+
var feedback := SentryFeedback.new()
16+
feedback.message = "I'm stuck in the wall!"
17+
feedback.contact_email = "[email protected]"
18+
feedback.name = "Bob"
19+
20+
SentrySDK.capture_feedback(feedback)
21+
```
22+
23+
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.
24+
25+
```GDScript
26+
var event_id = SentrySDK.capture_message("An event that will get user feedback.")
27+
# ...
28+
feedback.associated_event_id = event_id
29+
```

0 commit comments

Comments
 (0)