Support screenshot feature (via attachments)
@bruno-garcia is gonna link to the develop docs (with the specification)
the idea is that basically, it takes a SS when an event is captured and attach it to the event (via attachments). the feature is opt-in and it should be turned on via options.
we can either implement it natively or use a plugin like https://github.com/nusanet/flutter-native-screenshot dependencies are never a good idea though, so let's figure this out.
This can be done kinda easily just in Flutter. That way it's also available for all platforms (except the HTML web based renderer).
See https://api.flutter.dev/flutter/rendering/RenderRepaintBoundary/toImage.html
The drawback is that it requires a bit of manual code by the user.
nice, we can add support only for flutter non-web then, but the idea is to add it automatically.
this sounds awesome. between this and widget tree, would it mean we'd have complete lifecycle tracing, right?
this sounds awesome. between this and widget tree, would it mean we'd have complete lifecycle tracing, right?
What exactly do you mean by that? We already have complete lifecycle tracing?
not at performance level yet right? unless my pubspec has missed some big update.
Currently in a PR: https://github.com/getsentry/develop/pull/422/
As this has now been announced here: https://blog.sentry.io/2022/07/07/introducing-mobile-screenshots-and-suspect-commits
This would be really nice to have here as well!
It's mostly done already in https://github.com/getsentry/sentry-dart/pull/576. Someone from Sentry or another OSS contributer just needs to pick it up and finish it. It's not on my priority list at the moment.
Any update on this?
Any update on this?
I'll repeat myself and say
It's mostly done already in https://github.com/getsentry/sentry-dart/pull/576. Someone from Sentry or another OSS contributer just needs to pick it up and finish it. It's not on my priority list at the moment.
So, if you want, you can bring https://github.com/getsentry/sentry-dart/pull/576 up to date with develop, fix any remaining issues and it should be good to go. It shouldn't be too much work, since most of the groundwork is already done.
@AsjadSiddiqui We have a PR in the works, so expect an update on this soon(ish).
Is this supported in the latest build? The docs says to use attachScreenshoot option, but it seems to not exist in the latest version.
@ggirotto This is supported, you set this boolean flag on the SentryFlutterOptions when initializing the SDK. We do this in the example app in this repository.
That's my bad. I was using Sentry.init instead SentryFlutter.init. Thanks for the reply