getsentry / getsentry/sentry-rust
Implementing a capture_feedback function
- Dominant language
- Rust
- Stars
- 752
- Forks
- 190
- Avg merge
- 1h 21m
- Merged PRs (30d)
- 5
Description
I forked the repo to attempt to implement this function based off of the corresponding function in the Javascript SDK: https://github.com/getsentry/sentry-javascript/blob/136370c8d4f0c0cd9ec80b47ba2292406d0b4ba7/packages/core/src/feedback.ts#L8
From what I gather, the necessary steps are:
- Add a `Feedback` variant to the `Context` enum.
- Add a `FeedbackContext` struct that holds `contact_email`, `name`, and `message`.
- I'm not sure what to do about the `type` field in the Javascript `Event`. I see it in the Go SDK as well for their event type, but I don't see it in the Rust SDK's `Event` type.
- Add the `Context::Feedback` to the `contexts` field of the `Event`
- Call `capture_event` with this new `Event`.
I went ahead and implemented that locally, but it's showing up as an "unlabeled event" (and not displaying in the User Feedback section), even though the "Feedback" context is populated as shown in the screenshot below. I've also checked that the project this event is sent to has User Feedback enabled.
You can see what I've implemented so far here (there's no `capture_feedback` function, but I'm creating the event and calling `capture_event` manually in my own project): https://github.com/zmitchell/sentry-rust/commit/248de09e183481ae8c0186b246aec8fffcf22979
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.