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

Capture Screenshot and ViewHierarchy for single events #3007

Open
Tracked by #3602
philipphofmann opened this issue May 8, 2023 · 4 comments
Open
Tracked by #3602

Capture Screenshot and ViewHierarchy for single events #3007

philipphofmann opened this issue May 8, 2023 · 4 comments

Comments

@philipphofmann
Copy link
Member

Description

We could add an API similar to the following:

Attachment.captureScreenshot()
Attachment.captureViewHierarchy()

Then users could use the local scope to capture screenshots and view hierarchy for single events like this

SentrySDK.captureMessage(message: "my message", block: { scope in
	scope.addAttachment(Attachment.captureScreenshot())
})

Consider creating issues for all mobile platforms to have a consistent API.

Also, update the docs:

  1. https://docs.sentry.io/platforms/apple/enriching-events/attachments/
  2. https://docs.sentry.io/platforms/apple/guides/ios/enriching-events/screenshots/https://docs.sentry.io/platforms/apple/guides/ios/enriching-events/viewhierarchy/

Please upvote if you want this feature.

@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@rakuyoMo
Copy link

This feature is still important to me, and I understand that it seems like there are already other implementations for other platforms, but only iOS doesn't have it yet? If so that's pretty bad, looking forward to seeing it on iOS soon.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Aug 10, 2023
@kahest
Copy link
Member

kahest commented Aug 10, 2023

Hi @rakuyoMo - this specific feature is generally not available yet. We use this issue to track demand and might bump priority if it receives more upvotes.

On other platforms, Hints can be used to conditionally send Screenshots and/or View Hierarchies by filtering based on Hints in beforeSend. We have an issue open for implementing Hints on sentry-cocoa: #2325

@kahest
Copy link
Member

kahest commented Jan 16, 2024

Related issue to add a beforeCapture callback: #3137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Backlog
Development

No branches or pull requests

5 participants