sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

Add support to attach logcat output as an attachment

Open buenaflor opened this issue 6 months ago • 2 comments

Problem Statement

We could add a flag (disabled by default) that a user can enable so logcat output is stored and sent as an attachment to Android events

What would be nice in addition is to be able to get the logcat output on demand so we can sync it with Flutter and optionally also attach logcat output to Dart events

Solution Brainstorm

Draft implementation was done by a contributor on the Flutter side

https://github.com/getsentry/sentry-dart/pull/3011

buenaflor avatar Jul 04 '25 09:07 buenaflor

We should also expose an option for how many lines one wants to capture from the logcat output. Could be just a single option which enables/disables the integration based on the number of lines

romtsn avatar Jul 09 '25 12:07 romtsn

For the hybrid events we could add a new method to InternalSentrySdk which returns a ByteArray/String of the logcat content and then the hybird SDKs can decide where to put it

romtsn avatar Jul 09 '25 12:07 romtsn