-
-
Notifications
You must be signed in to change notification settings - Fork 199
feat: Add attachment support to user feedback #1414
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
base: master
Are you sure you want to change the base?
Conversation
|
|
Looks good at first glance, even though it feels like it's a lot of new API for a very specific use case. Since the goal is to add attachments to envelopes, I wonder if it would make sense to open up some of the existing but internal envelope APIs to make the same achievable in a more generic way. What do you think? |
To elaborate a bit, I'd propose wrapping/exposing the missing parts from sentry_value_t feedback = sentry_value_new_feedback(...);
sentry_envelope_t *envelope = sentry_envelope_new();
sentry_envelope_add_feedback(envelope, feedback);
sentry_envelope_attach_file(envelope, "screenshot.png");
sentry_capture_envelope(envelope); |
|
Exposing internal envelope APIs sounds like a reasonable alternative to me. However, if there are any concerns about doing so, the newly introduced hint type (perhaps with a more generic name like Also, the |
This PR adds the ability to attach files and binary data to feedback submissions allowing users to include screenshots, logs or other contextual information alongside their text messages.
The initial request to add attachment support for user feedback originated from the Unreal SDK:
Here, a hint pattern is used (borrowed from the Android SDK) which relies on an opaque pointer to provide a standardized way to attach optional context or metadata to feedback without modifying its core value.
Example usage:
Example feedback with two image attachments.
Current implementation focuses on the feedback use case but it leaves room for an easy refactor to support additional APIs later on if needed.