Skip to content
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

Add BeforeCaptureCallback - Screenshot #3137

Closed
Tracked by #135
thinkocapo opened this issue Jul 11, 2023 · 6 comments · Fixed by #4016
Closed
Tracked by #135

Add BeforeCaptureCallback - Screenshot #3137

thinkocapo opened this issue Jul 11, 2023 · 6 comments · Fixed by #4016

Comments

@thinkocapo
Copy link

Problem Statement

https://docs.sentry.io/platforms/apple/guides/ios/enriching-events/screenshots/ does not have it.

SDK's Screenshot feature does not have the callback setBeforeScreenshotCaptureCallback

Users want to decide if they want to send the screenshot or not, based on data from the event in the callback (event,hint,debounce).

Solution Brainstorm

Add the callback function as a feature, like how Android SDK has it.
https://docs.sentry.io/platforms/android/enriching-events/screenshots/

Are you willing to submit a PR?

No response

@philipphofmann
Copy link
Member

Related to getsentry/team-mobile#135.

@philipphofmann philipphofmann changed the title Add BeforeScreenshotCaptureCallback Add BeforeCaptureCallback Jul 11, 2023
@philipphofmann
Copy link
Member

philipphofmann commented Jul 12, 2023

Currently, we can only pass a little context into this callback except for the captured event, which doesn't tell the user much about for which screen the SDK is capturing the screenshot. This feature will be easier to implement once we have report current screen in the app context, which is on our roadmap. Then the user knows for which screen we are capturing the screenshot, and they can better decide which ones to keep and which to throw away.

@brustolin brustolin moved this from Needs Discussion to Backlog in Mobile & Cross Platform SDK Nov 29, 2023
@kahest
Copy link
Member

kahest commented Nov 29, 2023

Wrt. #3137 (comment) - we need to make sure that at the time of the callback, the screen/view info is already available in the event, otherwise this can't be used for filtering. Also, this is another data point that #2325 (hints support) is valuable.

@thinkocapo thinkocapo changed the title Add BeforeCaptureCallback Add BeforeCaptureCallback - Screenshot Jan 16, 2024
@ananya-mallik-ps
Copy link

ananya-mallik-ps commented Apr 25, 2024

We are in the POC stage, evaluating sentry's SaaS solution.

A critical requirement for us is the ability to filter iOS screenshots by specific screens. Currently, this functionality is lacking, making the screenshot feature impractical for our purposes due to several sensitive screens that shouldn't be captured.

Implementing this feature would significantly enhance the value of using Sentry for us.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Apr 25, 2024
@kahest
Copy link
Member

kahest commented Apr 25, 2024

Thanks for your input @ananya-mallik-ps, that's helpful. While I can't give a concrete timeline right now, we will bump priority on this

@kahest kahest moved this from Backlog to Needs Discussion in Mobile & Cross Platform SDK Apr 25, 2024
@philipphofmann philipphofmann moved this from Needs Discussion to Todo in Mobile & Cross Platform SDK May 8, 2024
@philipphofmann philipphofmann self-assigned this May 27, 2024
@philipphofmann philipphofmann moved this from Todo to In Progress in Mobile & Cross Platform SDK May 27, 2024
philipphofmann added a commit that referenced this issue May 27, 2024
Add a callback to the options to decide if the SDK should capture a
screenshot or not.

Fixes GH-3137
philipphofmann added a commit that referenced this issue May 27, 2024
Add a callback to the options to decide if the SDK should capture a
screenshot or not.

Fixes GH-3137
philipphofmann added a commit that referenced this issue May 27, 2024
Add a callback to the options to decide if the SDK should capture a
screenshot or not.

Fixes GH-3137
@philipphofmann philipphofmann moved this from In Progress to Needs Review in Mobile & Cross Platform SDK May 27, 2024
philipphofmann added a commit that referenced this issue May 27, 2024
Add a callback to the options to decide if the SDK should capture a
screenshot or not.

Fixes GH-3137
@github-project-automation github-project-automation bot moved this from Needs Review to Done in Mobile & Cross Platform SDK May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants