Skip to content

fix(logging): Reduce debug logs verbosity #4341

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

Merged
merged 5 commits into from
Apr 17, 2025
Merged

Conversation

romtsn
Copy link
Member

@romtsn romtsn commented Apr 16, 2025

📜 Description

  • Introduce new debug option under the session replay sub-options. This controls verbose logging of Session Replay-specific code paths.
    • Introduce a bash script that disables/enables system logs via adb shell
    • Hook the script via a Gradle task which reads the session-replay.debug manifest option and runs the script for the sample app
  • Reduce log levels for some logs
  • Get rid of printing Throwables with stacktraces for logs where it's expected to fail in some cases (e.g. no Compose dependency)
  • Change indent when serializing Profiles' measurements, because the list is too big and makes logcat unreadable

💡 Motivation and Context

Fixes #4307
Fixes getsentry/sentry-dart#2673

💚 How did you test it?

Existing tests should cover it

The script I tested manually

📝 Checklist

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Copy link
Contributor

github-actions bot commented Apr 16, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 400.98 ms 411.27 ms 10.29 ms
Size 1.58 MiB 2.08 MiB 506.77 KiB

Previous results on branch: rz/fix/verbose-logging

Startup times

Revision Plain With Sentry Diff
8815946 434.94 ms 446.06 ms 11.12 ms
9ed4119 426.52 ms 457.96 ms 31.44 ms

App size

Revision Plain With Sentry Diff
8815946 1.58 MiB 2.08 MiB 505.85 KiB
9ed4119 1.58 MiB 2.08 MiB 505.84 KiB

@romtsn romtsn enabled auto-merge (squash) April 17, 2025 14:25
@romtsn romtsn merged commit 2365d34 into main Apr 17, 2025
38 checks passed
@romtsn romtsn deleted the rz/fix/verbose-logging branch April 17, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve log output during SDK init Sentry showing a lot of erros on debug
2 participants