Skip to content

Add attachments to user feedback #49946

Closed

Description

@franNadalesDN

Problem Statement

I want users to be able to report issues and feedback with attachments such log files or images.

Solution Brainstorm

Use similar structure as events for User feedback.

Product Area

User Feedback

Activity

  1. getsantry commented on May 30, 2023

    @getsantry
    Contributor

    Assigning to @getsentry/support for routing, due by Tuesday, May 30th at 5:00 pm (sfo). ⏲️

  2. getsantry commented on May 30, 2023

    @getsantry
    Contributor

    Routing to @getsentry/product-owners-user-feedback for triage, due by Thursday, June 1st at 11:54 am (sfo). ⏲️

  3. moved this to Waiting for: Product Owner in GitHub Issues with 👀on Jun 7, 2023
  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀on Nov 3, 2023
  5. bruno-garcia commented on Mar 4, 2024

    @bruno-garcia
    Member

    Today the feedback you can submit with the SDK takes an event_id. So you need to capture an exception or at least a message to attach the feedback to. The same way you can use that event_id to tie attachments to it.

    I believe we can improve this by letting you capture feedbacks without the need to capture an event (error/msg), and we recently did that to power our new Widget. So it's something we can look into going forward but for now I suggest using the captureMessage with Attachment + captureUserFeedback route

  6. billyvg commented on Mar 6, 2024

    @billyvg
    Member

    We are also adding screenshotting to our User Feedback widget: #63749

  7. bruno-garcia commented on Mar 11, 2024

    @bruno-garcia
    Member

    For reference the old API is: https://develop.sentry.dev/sdk/features/#user-feedback

    The new API could take a local scope:

    let feedback = {name:"", message:""}
    Sentry.captureUserFeedback(feedback, scope => scope.addAttachment(...));

    The blocker for this approach is the backend accepting the user feedback envelope together with attachments, as we allow for error events. @JoshFerge is this something you can help us with?

  8. ryan953 commented on Apr 30, 2024

    @ryan953
    Member

    The new/updated api to call is being implemented in getsentry/sentry-javascript#11428

    It'll be available on v8.0.0 of the SDK as Sentry.captureFeedback() and will very closely align with the other captureException() and captureMessage() methods we have.

    The specific method is implemented with this signature & types:

    interface SendFeedbackParams {
      message: string;
      name?: string;
      email?: string;
      url?: string;
      source?: string;
      associatedEventId?: string;
    }
    interface EventHint {
      event_id?: string;
      captureContext?: CaptureContext;
      mechanism?: Partial<Mechanism>;
      syntheticException?: Error | null;
      originalException?: unknown;
      attachments?: Attachment[];
      data?: any;
      integrations?: string[];
    }
    
    function captureFeedback(
      feedbackParams: SendFeedbackParams,
      hint: EventHint & { includeReplay?: boolean } = {},
    ): string
    

    Look out for it once #11428 lands, which should be part of 8.0.0-beta.6 and beyond.

  9. mydea commented on May 28, 2024

    @mydea
    Member

    Hey,

    this is possible to do in v8 now - you can use it like follows:

    Sentry.captureFeedback(
      { message: "I really like your App, thanks!" },
      {
        attachments: [
          {
            filename: "screenshot.png",
            data: "base64-encoded-image",
          },
        ],
      }
    );
  10. locked and limited conversation to collaborators on Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions