sentry-java
sentry-java copied to clipboard
Flush logs on crash
:scroll: Description
When a crash occurs, logs are flushed with a 500 timeout millis Moved replay capture after sending the crash
:bulb: Motivation and Context
We ensure to store logs to disk (or even send them) instead of losing them due to being only in memory when a crash occurs
: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
Performance metrics :rocket:
| Plain | With Sentry | Diff | |
|---|---|---|---|
| Startup time | 356.27 ms | 406.20 ms | 49.93 ms |
| Size | 1.58 MiB | 2.10 MiB | 532.45 KiB |
Baseline results on branch: main
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 85d7417a846f4cc45e4da72526575ee97c3b723f | 347.21 ms | 394.35 ms | 47.15 ms |
| 674d43786b1afbf2681f2001cda625668f38f08d | 355.28 ms | 504.18 ms | 148.90 ms |
| 7314dbe9a503d08c0c4688b0d95f9476c3da1a57 | 437.83 ms | 505.64 ms | 67.81 ms |
| 3699cd5331a4c334c1e8a4bd85aa8e399f5c4231 | 423.60 ms | 495.52 ms | 71.92 ms |
| 17a0955e8a90b09282749d5035b5590b8cc57aac | 372.53 ms | 446.70 ms | 74.17 ms |
| ee747ae50ffec79f1ea20d100ea98e8520ab4ed4 | 382.73 ms | 435.41 ms | 52.68 ms |
| ee747ae50ffec79f1ea20d100ea98e8520ab4ed4 | 405.43 ms | 485.70 ms | 80.28 ms |
| b750b96f77722de665587c3d735804e33d83bd89 | 421.25 ms | 444.09 ms | 22.84 ms |
| ee747ae50ffec79f1ea20d100ea98e8520ab4ed4 | 357.79 ms | 421.84 ms | 64.05 ms |
| ee747ae50ffec79f1ea20d100ea98e8520ab4ed4 | 386.94 ms | 431.43 ms | 44.49 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 85d7417a846f4cc45e4da72526575ee97c3b723f | 1.58 MiB | 2.10 MiB | 533.44 KiB |
| 674d43786b1afbf2681f2001cda625668f38f08d | 1.58 MiB | 2.10 MiB | 530.94 KiB |
| 7314dbe9a503d08c0c4688b0d95f9476c3da1a57 | 1.58 MiB | 2.10 MiB | 533.45 KiB |
| 3699cd5331a4c334c1e8a4bd85aa8e399f5c4231 | 1.58 MiB | 2.10 MiB | 533.45 KiB |
| 17a0955e8a90b09282749d5035b5590b8cc57aac | 1.58 MiB | 2.10 MiB | 533.20 KiB |
| ee747ae50ffec79f1ea20d100ea98e8520ab4ed4 | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| ee747ae50ffec79f1ea20d100ea98e8520ab4ed4 | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| b750b96f77722de665587c3d735804e33d83bd89 | 1.58 MiB | 2.10 MiB | 533.20 KiB |
| ee747ae50ffec79f1ea20d100ea98e8520ab4ed4 | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| ee747ae50ffec79f1ea20d100ea98e8520ab4ed4 | 1.58 MiB | 2.10 MiB | 530.95 KiB |
Previous results on branch: stefanosiano/fix/flush-logs-on-crash
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2fa0faf11918c60a6e4516938d07933b6215d992 | 403.78 ms | 474.48 ms | 70.70 ms |
| d59a3349c16ea4d2a23755dbf6038a70f104f3b0 | 414.34 ms | 504.04 ms | 89.70 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2fa0faf11918c60a6e4516938d07933b6215d992 | 1.58 MiB | 2.10 MiB | 533.40 KiB |
| d59a3349c16ea4d2a23755dbf6038a70f104f3b0 | 1.58 MiB | 2.10 MiB | 533.44 KiB |