Skip to content

Capture logcat output as attachment #3075

Open

Description

@bruno-garcia

Problem Statement

Through this issue, we started capturing logcat logs as breadcrumb:

We used the gradle plugin and bytecode manipulation to capture the logcat API done by libraries in the app itself. But that means we're not capturing system logs, for example.

@romtsn said:

this works for the app and libraries logcat calls, but not the system ones. Also it supports all Android versions, while this approach is from API 23 and above.

We received a PR in the .NET SDK

That adds logcat logs as attachments (opt-in) with mime type text/logcat. And a ticket was created to have a custom preview in Sentry:

Ideally this is available for all cross platform SDKs like React Native and Flutter. If it can't be made available through the native bridget, we can duplicate this ticket in the other repos.

Activity

  1. markushi commented on Dec 13, 2023

    @markushi
    Member

    As the logcat output may contains PII data we need to be careful here.
    Other considerations:

    • make the feature opt-in
    • filter output by running app / process id + system apps
  2. markushi commented on Dec 13, 2023

    @markushi
    Member

    @bruno-garcia up for a PR? 😉

  3. bruno-garcia commented on Jan 2, 2024

    @bruno-garcia
    MemberAuthor

    I wish, don't really find the time to contribute much. Wanted to get this one in and didn't manage to yet: getsentry/sentry-dotnet#2709

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions