Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

User Feedback Feature Request: Custom context #10916

Copy link
Copy link
@lbernick

Description

@lbernick
Issue body actions

Problem Statement

Use case: When an error occurs, we prompt the user for feedback and also for consent to upload diagnostic info. Diagnostic info is uploaded to cloud storage, and I'd like to associate the cloud storage URI with the event created in Sentry. This URI is only generated after the user consents to uploading diagnostics, so it's not available at the time of the crash. This is very similar to https://forum.sentry.io/t/updating-event-after-initial-upload/15057 but I didn't see a solution for that issue.

For user feedback that isn't related to a crash, we can do:

    Sentry.withScope(function (scope) {
      scope.setContext("Diagnostic Info", {
        URI: uri,
      })
      eventId = Sentry.captureMessage(`User Feedback from ${name}`)
    })
    const userFeedback = {
      event_id: eventId,
      name: name,
      email: email,
      comments: comments,
    }
    Sentry.captureUserFeedback(userFeedback)

However, for user feedback for a crash report, I don't see a way of attaching this context to the original event.

Workarounds:
I'd rather not do either of these options but I suppose they could work:

  • use "comments" field in user feedback api for jsonified context
  • create a global setting to opt in to diagnostics upload and automatically upload after a crash

Let me know if there are other options I should consider.

Alternatives:

  • Attachments for user feedback: This could work but the size of the diagnostic info is larger than Sentry's allowable attachment size.
  • Allow an event's context to be updated after creation.

Solution Brainstorm

No response

Product Area

User Feedback

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    Status

    No status
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.