-
-
Notifications
You must be signed in to change notification settings - Fork 461
Attach MDC properties to logs as attributes #4786
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
Conversation
4fa3eaf to
b10a3b4
Compare
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| ee747ae | 374.71 ms | 455.18 ms | 80.47 ms |
| 9fbb112 | 401.87 ms | 515.87 ms | 114.00 ms |
| c8125f3 | 397.65 ms | 485.14 ms | 87.49 ms |
| c8125f3 | 383.82 ms | 441.66 ms | 57.84 ms |
| ee747ae | 357.79 ms | 421.84 ms | 64.05 ms |
| ce0a49e | 532.00 ms | 609.96 ms | 77.96 ms |
| b3d8889 | 371.69 ms | 432.96 ms | 61.26 ms |
| 889ecea | 367.58 ms | 437.52 ms | 69.94 ms |
| b750b96 | 421.25 ms | 444.09 ms | 22.84 ms |
| 3d205d0 | 352.15 ms | 432.53 ms | 80.38 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| 9fbb112 | 1.58 MiB | 2.11 MiB | 539.18 KiB |
| c8125f3 | 1.58 MiB | 2.10 MiB | 532.32 KiB |
| c8125f3 | 1.58 MiB | 2.10 MiB | 532.32 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| ce0a49e | 1.58 MiB | 2.10 MiB | 532.94 KiB |
| b3d8889 | 1.58 MiB | 2.10 MiB | 535.06 KiB |
| 889ecea | 1.58 MiB | 2.11 MiB | 539.75 KiB |
| b750b96 | 1.58 MiB | 2.10 MiB | 533.20 KiB |
| 3d205d0 | 1.58 MiB | 2.10 MiB | 532.97 KiB |
Previous results on branch: lcian/feat/mdc-logs
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 9b37b7e | 474.85 ms | 539.58 ms | 64.73 ms |
| 60b38dd | 371.02 ms | 439.54 ms | 68.52 ms |
| 8eb9638 | 352.96 ms | 433.26 ms | 80.30 ms |
| 0751889 | 371.21 ms | 442.88 ms | 71.67 ms |
| f9e3924 | 351.51 ms | 447.96 ms | 96.45 ms |
| 18fec33 | 381.39 ms | 464.69 ms | 83.30 ms |
| 4fd0d5d | 422.43 ms | 473.47 ms | 51.04 ms |
| 0cfa2ae | 427.47 ms | 507.46 ms | 79.99 ms |
| b0d6d12 | 381.21 ms | 410.46 ms | 29.25 ms |
| 6a3a87d | 370.96 ms | 433.26 ms | 62.30 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 9b37b7e | 1.58 MiB | 2.11 MiB | 539.70 KiB |
| 60b38dd | 1.58 MiB | 2.11 MiB | 538.89 KiB |
| 8eb9638 | 1.58 MiB | 2.11 MiB | 539.17 KiB |
| 0751889 | 1.58 MiB | 2.11 MiB | 538.88 KiB |
| f9e3924 | 1.58 MiB | 2.11 MiB | 538.89 KiB |
| 18fec33 | 1.58 MiB | 2.11 MiB | 539.17 KiB |
| 4fd0d5d | 1.58 MiB | 2.11 MiB | 539.18 KiB |
| 0cfa2ae | 1.58 MiB | 2.11 MiB | 539.70 KiB |
| b0d6d12 | 1.58 MiB | 2.11 MiB | 538.89 KiB |
| 6a3a87d | 1.58 MiB | 2.11 MiB | 539.70 KiB |
|
I would prefer if we also use As a first step, I'd just add all MDC values according to |
381701f to
38b07b7
Compare
Yeah that makes sense, changed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, I've left two comments
Co-authored-by: Markus Hintersteiner <markus.hintersteiner@sentry.io>
sentry-log4j2/src/test/kotlin/io/sentry/log4j2/SentryAppenderTest.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
📜 Description
options.contextTagsproperty as an allow-list for which properties to attach.LoggerPropertiesUtilclass.💡 Motivation and Context
Close #4783
Close JAVA-197
💚 How did you test it?
Unit tests.
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps