sentry-java
sentry-java copied to clipboard
Send logcat through Sentry Logs
:scroll: Description
SentryLogcatAdapter now forwards output to Sentry Logs, if enabled
:bulb: Motivation and Context
Closes https://github.com/getsentry/sentry-java/issues/4408
:green_heart: How did you test it?
:pencil: Checklist
- [ ] I added tests to verify the changes.
- [ ] No new PII added or SDK only sends newly added PII if
sendDefaultPIIis 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.
:crystal_ball: Next steps
| Messages | |
|---|---|
| :book: | Do not forget to update Sentry-docs with your feature once the pull request gets approved. |
Generated by :no_entry_sign: dangerJS against 4a90aba315110c054518ead1ad6934154b3762d7
Performance metrics :rocket:
| Plain | With Sentry | Diff | |
|---|---|---|---|
| Startup time | 336.43 ms | 377.71 ms | 41.29 ms |
| Size | 1.58 MiB | 2.09 MiB | 518.94 KiB |
Previous results on branch: feat/logcat-sentry-logs
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2e00745d86fdd2f2bf5595a20266b4e56bc23122 | 440.67 ms | 489.81 ms | 49.14 ms |
| 296205e847eb50eb898f435c87f527dc2e3adc58 | 397.86 ms | 416.63 ms | 18.77 ms |
| 229d93757e27987cea34e39b8d1ab29ecc8261d1 | 407.06 ms | 448.72 ms | 41.66 ms |
| d035656eb9c3dea4956086d905f18b365b1c038f | 399.04 ms | 416.73 ms | 17.69 ms |
| 771a432569118928b212cbcfcaa80628a862862b | 410.52 ms | 458.84 ms | 48.32 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2e00745d86fdd2f2bf5595a20266b4e56bc23122 | 1.58 MiB | 2.09 MiB | 518.68 KiB |
| 296205e847eb50eb898f435c87f527dc2e3adc58 | 1.58 MiB | 2.09 MiB | 518.67 KiB |
| 229d93757e27987cea34e39b8d1ab29ecc8261d1 | 1.58 MiB | 2.09 MiB | 518.93 KiB |
| d035656eb9c3dea4956086d905f18b365b1c038f | 1.58 MiB | 2.08 MiB | 511.32 KiB |
| 771a432569118928b212cbcfcaa80628a862862b | 1.58 MiB | 2.08 MiB | 511.32 KiB |
Hi, this is a feature I am quite keen on, so just dropping some useful (easy to add?) additions
- Automatically include the log tag as an attribute of the log event
- Introduce a config option where the minimum log level can be set
hi @ishanzuaim, and thanks for the interest!
You can already set the minimum logging level in the gradle plugin options following the logcat integration documentation
sentry {
tracingInstrumentation {
...
logcat {
enabled = true
minLevel = LogcatLevel.WARNING
}
}
}
We'll discuss how to best send the tag in the logs, too!