Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Conversation

@lucas-zimerman
Copy link
Contributor

@lucas-zimerman lucas-zimerman commented Jul 15, 2021

This WIP feature allows adding screenshots to events whenever possible.

new Sentry options:

  • AttachScreenshots: Attaches screenshots from the app to events automatically whenever possible.
  • ScreenshotQuality: (Low, Medium, High) allows the user to choose the quality of the screenshots (default low for lower file sizes)
  • file format: Jpeg whenever available.

Goals

* Use of native code so that porting this feature becomes easier to native SDKs.

  • Support iOS, Android, and UWP (other platforms doesn't support attaching a screenshot exclusively from the application)
  • Have an event processor that can inject attachments to an event being processed.

Sample Event: https://sentry.io/organizations/sentry-sdks/discover/sentry-xamarin:970c172209f54cf3827b0f3813185764

I suggest the usage of jpeg by default due to the lower performance impact compared to png encoding (see: https://blender.stackexchange.com/questions/148231/what-image-format-encodes-the-fastest-or-at-least-faster-png-is-too-slow)

Challenges

  • Event Processors doesn't allow the insertion of attachments directly into events, requiring you to edit the scope (and with that, the screenshot may be attached to all future events and not the current one)

/// <summary>
/// Attaches screenshots from the app to events automatically whenever possible.
/// </summary>
public bool AttachScreenshots { get; set; }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably include a note about PII.
There could be potentially private information in the screenshot. For example in bank or chat apps.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree

@lucas-zimerman lucas-zimerman marked this pull request as ready for review July 27, 2021 20:59
Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should release a preview with this

@bruno-garcia bruno-garcia merged commit 411be60 into main Aug 3, 2021
@bruno-garcia bruno-garcia deleted the feat/screenshot branch August 3, 2021 22:33
@bruno-garcia
Copy link
Member

@lucas-zimerman no changelog entry?

No Danger? :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants