-
-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEATURE REQUEST: User Feedback #500
Comments
This would be very helpful. Being able to collect feedback from an app when the user runs across something that they believe to be a bug, getting interesting state data, a screenshot, maybe even annotated screenshot – that would be very nice |
All very possible from the react-native side too. |
In the mean time, I had been looking at going for an alternative solution which was to call the user feedback API endpoint directly like so:
I thought it had worked because it returned a JSON response like so: {
"eventID": "1234abcd",
"name": "John Smith",
"event": { "eventID": "1234abcd", "id": null },
"user": null,
"dateCreated": "2018-12-26T22:01:40.883Z",
"issue": null,
"id": "443876",
"comments": "there is an issue with the app",
"email": "[email protected]"
} But it doesn't seem to actually get added to the user feedback :( I'm sure that it's pointing to the right project and the details are right because error reporting does work: Not sure if I'm missing something... |
@saadq, The reason feedback is not showing in the dashboard is because you need to give actual The question becomes how can we get actual event_id? |
Hey @naytun, thanks for bringing this up. I actually did realize that at some point awhile back, but I forgot to update here. There is a I opened an issue here for that: #527 I got a reply from one of the maintainers on the proper way to do it, but I hadn't tried it out. If that doesn't work out for you, I can give you the alternative method I used to get it to work, although it was pretty hacky. |
@saadq, Thank you for the quick feedback and also for the tip. I'll try lastEventId() see I could get it working. |
@saadq, I can successfully get eventID like this.
Thank you for your tip! |
Awesome, glad to see it works! |
submit a PR @saadq to report these changes via a new API method? it's a start. I doubt many people will be keen to have a sentry looking UI feedback form in their apps anyway. |
Hi @saadq, so u did a mix of native fetch() and Sentry-js to get it to work? |
Hey @MM-Psiiirus, So to get this to work, you basically need to do a POST request to Something like: let endpoint = 'https://sentry.io/api/0/projects/{your_organization_slug}/{your_project_slug}/user-feedback/'
let params = {
event_id: ...,
name: 'John Smith',
email: '[email protected]',
comments: 'This app sucks'
}
try {
await fetch(endpoint, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
})
console.log('Feedback submitted!')
} catch (error) {
console.error(error)
} You will basically need to use @export-mike Not exactly sure what you meant by that PR, just to check what exactly are you proposing? Right now with the way I described above, you would just have your own custom form that takes in |
@saadq add the following: function submitFeedback(params){
let endpoint = 'https://sentry.io/api/0/projects/{your_organization_slug}/{your_project_slug}/user-feedback/'
return fetch(endpoint, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
})
}
}
let params = {
event_id: ...,
name: 'John Smith',
email: '[email protected]',
comments: 'This app sucks'
}
Sentry.submitFeedback(params); as a new JS function to Sentry |
Thanks for the code @saadq - that worked great, but I did need to add an authorization header (using DSN auth, so no secrets are required):
|
Hi! Any update on this? Is this feature will someday be ported to the React Native version? |
Also interested for a react app. It seems to exist in the https://www.npmjs.com/package/@sentry/browser package, but it doesn't play nicely with Next.js which is a universal app (browser + node) and requires to apply some dirty tricks like https://github.com/zeit/next.js/blob/canary/examples/with-sentry-simple/next.config.js to use Sentry universally. But even with that I wasn't able to make User Feedback work in Next. I don't know if react-native has this kind of issues though, may be unrelated. But looking forward a universal Sentry SDK for JS. |
I am getting error as Sentry.lastEventId() is not a function. Anyone get user feedback successfully by using the above api for react-native apps(ios and android) |
Any update on the added function? Also where do i find the |
i am a little confused; is this feature implemented? Is there a complete or close to complete example please? |
@sammysium No the feature has not been officially implemented yet, but it shouldn't be difficult to manually implement it per app. As other commenters have pointed out, you can send a POST request to our API endpoint: https://docs.sentry.io/api/projects/submit-user-feedback/ You can get the slugs from opening your project settings, which should have a URL like this:
you can access this by going to The API request will need an authentication header: |
We added User Feedback to Android and iOS. To add here now we just need to write an envelope item of type User Feedback. I marked it as up-for-grabs if someone wants to try to add it. The TypeScript API can be done directly here for now. To go on the JavaScript SDK it will require sending it via the JS transport, which we don't use here. Once the API is added to JS, we can remove the one here in favor of that one. The docs for the feature is here: https://develop.sentry.dev/sdk/features/#user-feedback |
Would be great to not put this to stale, as there seems to be quite some interest in this feature by many people. |
We plan to tackle this one soon |
Currently blocked because of getsentry/sentry-javascript#4240 |
I would like to add another Idea to this feature request, and it has to do with implementing a way to attach images and videos by the user as Instabug makes. That would be nice, since sometimes we can use these resources for better debugging. |
Expressing interest in this feature as well! |
This would be nice. My current workaround is to send it directly to the API endpoint as described here - which works but is of course not optimal. |
Platform:
RavenJS has a useful user-feedback feature to capture more information on how the error occured. This is super useful for internal testing for testers to use as and when errors happen.
expect a new function to be added to render UI to capture details from the user in a text field.
The text was updated successfully, but these errors were encountered: