-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated docs to use the new Feedback APIs
- Loading branch information
1 parent
d95cbf9
commit a980fae
Showing
1 changed file
with
14 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -6,30 +6,40 @@ sidebar_order: 6000 | |
|
||
When a user experiences an error, Sentry provides the ability to collect additional feedback. You can collect feedback according to the method supported by the SDK. | ||
|
||
## Use the .NET SDK | ||
## User Feedback API | ||
|
||
<Alert> | ||
|
||
User Feedback for **[ASP.NET](/platforms/dotnet/guides/aspnet/user-feedback/#integration)** or **[ASP.NET Core](/platforms/dotnet/guides/aspnetcore/user-feedback/#integration)** supply integrations specific to supporting those SDKs. | ||
|
||
</Alert> | ||
|
||
You can create a form to collect the user input in your preferred framework, and use the SDK's API to send the information to Sentry. You can also use the widget, as described below. If you'd prefer an alternative to the widget or do not have a JavaScript frontend, you can use this API: | ||
You can create a form to collect the user input in your preferred framework, and use the SDK's API to send the information to Sentry. | ||
|
||
```csharp {tabTitle:C#} | ||
var eventId = SentrySdk.CaptureMessage("An event that will receive user feedback."); | ||
|
||
SentrySdk.CaptureUserFeedback(eventId, "[email protected]", "It broke.", "The User"); | ||
var feedback = new SentryFeedback("It broke.", "[email protected]", "Joe Shmoe", associatedEventId: eventId); | ||
var hint = new SentryHint(); | ||
hint.AddAttachment("c:\foo.png", AttachmentType.Default, "image/png"); // You can also add a screenshot | ||
SentrySdk.CaptureFeedback(feedback, hint: hint); | ||
``` | ||
|
||
```fsharp {tabTitle:F#} | ||
open Sentry | ||
let eventId = SentrySdk.CaptureMessage("An event that will receive user feedback.") | ||
SentrySdk.CaptureUserFeedback(eventId, "[email protected]", "It broke.", "The User") | ||
let feedback = SentryFeedback("It broke.", "[email protected]", "Joe Shmoe", associatedEventId = eventId) | ||
let hint = SentryHint() | ||
hint.AddAttachment("c:\foo.png", AttachmentType.Default, "image/png") // You can also add a screenshot | ||
SentrySdk.CaptureFeedback(feedback, hint) | ||
``` | ||
|
||
Alternatively you can also use the widget, as described below. | ||
|
||
## Crash-Report Modal | ||
|
||
Our embeddable, JavaScript-based, Crash-Report modal is useful when you would typically render a plain error page (the classic `500.html`) on your website. | ||
|