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 before-capture-callback and debouncing for screenshots/view hierarchy #1540

Closed
Tracked by #135
krystofwoldrich opened this issue Jul 6, 2023 · 4 comments · Fixed by #1805
Closed
Tracked by #135

Add before-capture-callback and debouncing for screenshots/view hierarchy #1540

krystofwoldrich opened this issue Jul 6, 2023 · 4 comments · Fixed by #1805
Assignees

Comments

@krystofwoldrich
Copy link
Member

Description

Right now there's little control over when screenshots or view hierarchies are captured. This can have a negative impact on the app performance itself (capturing many screenshots, contribution to quota) as well as the usability of the feature itself (no control when a screenshot should be taken or not).

@krystofwoldrich
Copy link
Member Author

User issue asking for this feature -> #1544

@achernoprudov
Copy link

achernoprudov commented Sep 27, 2023

Would be nice to have SentryViewHierarchy in the callback.

In my case, I would like to capture screenshots only if there are no secure widgets in the view hierarchy. So BFS in view hierarchy can solve the issue.

In our banking app it's PII concern and we would like to protect our users sensitive information.

@buenaflor
Copy link
Contributor

buenaflor commented Nov 23, 2023

@achernoprudov hi! this issue is in our backlog. we will provide the SentryEvent and Hint in the callback. Hint includes the viewHierarchy although the viewHierarchy would already be serialized as a SentryAttachment so that might not help your use case much unless you can deserialize it. We will discuss this further internally

@buenaflor
Copy link
Contributor

buenaflor commented Nov 23, 2023

@achernoprudov after internal discussion, while these options will be standard in the callback, we will not provide an out of the box deserialization for this. What you will be able to do is use the bytes to convert it into a string (json): hint?.viewHierarchy?.bytes -> to string and check if your secure widget can be found in the view hierarchy.

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
Development

Successfully merging a pull request may close this issue.

5 participants