Skip to content

Commit 2d8c7f4

Browse files
authored
docs: Add user email and name to feedbackDialog options
docs: Add user email and name to feedbackDialog options
2 parents 99cb32e + 42960fb commit 2d8c7f4

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

src/collections/_documentation/learn/user-feedback-example/browser.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
<script>
55
Sentry.init({
66
dsn: '___PUBLIC_DSN___',
7-
beforeSend: (event) => {
8-
// Check if it is an exception -> Show report dialog
9-
event.exception && Sentry.showReportDialog();
7+
beforeSend(event) {
8+
// Check if it is an exception, if so, show the report dialog
9+
if (event.exception) {
10+
Sentry.showReportDialog();
11+
}
1012
return event;
1113
}
1214
});
1315
</script>
14-
```
16+
```

src/collections/_documentation/learn/user-feedback-example/electron.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ const { init, showReportDialog } = require('@sentry/electron');
33

44
init({
55
dsn: '___PUBLIC_DSN___',
6-
beforeSend: event => {
7-
// Check if it is an exception -> Show report dialog
6+
beforeSend(event) {
7+
// Check if it is an exception, if so, show the report dialog
88
// Note that this only will work in the renderer process, it's a noop on the main process
9-
event.exception && showReportDialog();
9+
if (event.exception) {
10+
Sentry.showReportDialog();
11+
}
1012
return event;
11-
},
13+
}
1214
});
13-
```
15+
```

src/collections/_documentation/learn/user-feedback.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ An override for Sentry’s automatic language detection (e.g. `lang=de`)
2929
| --- | --- |
3030
| `eventId` | Manually set the id of the event. |
3131
| `dsn` | Manually set dsn to report to. |
32+
| `user` | Manually set user data _[an object with keys listed above]_. |
33+
| `user.email` | User's email address. |
34+
| `user.name` | User's name. |
3235
| `lang` | _[automatic]_**override for Sentry’s language code** |
3336
| `title` | It looks like we’re having issues. |
3437
| `subtitle` | Our team has been notified. |

0 commit comments

Comments
 (0)