Only set log template if message differs from template#4682
Merged
Conversation
582ae2d to
588f0f5
Compare
Member
Author
|
did some happy path testing using our samples and those looked good (only adding the template when needed) most notable things I didn't test yet:
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| ee747ae | 382.73 ms | 435.41 ms | 52.68 ms |
| ee747ae | 415.92 ms | 470.15 ms | 54.23 ms |
| ee747ae | 400.46 ms | 423.61 ms | 23.15 ms |
| ee747ae | 554.98 ms | 611.50 ms | 56.52 ms |
| ee747ae | 358.21 ms | 389.41 ms | 31.20 ms |
| 3699cd5 | 423.60 ms | 495.52 ms | 71.92 ms |
| 85d7417 | 347.21 ms | 394.35 ms | 47.15 ms |
| 7314dbe | 437.83 ms | 505.64 ms | 67.81 ms |
| ee747ae | 357.79 ms | 421.84 ms | 64.05 ms |
| ee747ae | 374.71 ms | 455.18 ms | 80.47 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| 3699cd5 | 1.58 MiB | 2.10 MiB | 533.45 KiB |
| 85d7417 | 1.58 MiB | 2.10 MiB | 533.44 KiB |
| 7314dbe | 1.58 MiB | 2.10 MiB | 533.45 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
Previous results on branch: 08-29-only_set_log_template_if_message_differs_from_template
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| ed01fec | 419.94 ms | 472.60 ms | 52.67 ms |
| 3e8af17 | 543.45 ms | 633.96 ms | 90.51 ms |
| dc50773 | 382.94 ms | 460.84 ms | 77.90 ms |
| 43b13a8 | 535.13 ms | 613.52 ms | 78.39 ms |
| 880ef1a | 394.84 ms | 450.60 ms | 55.76 ms |
| cf17b6c | 382.60 ms | 439.38 ms | 56.78 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| ed01fec | 1.58 MiB | 2.10 MiB | 533.44 KiB |
| 3e8af17 | 1.58 MiB | 2.10 MiB | 533.44 KiB |
| dc50773 | 1.58 MiB | 2.10 MiB | 533.44 KiB |
| 43b13a8 | 1.58 MiB | 2.10 MiB | 533.44 KiB |
| 880ef1a | 1.58 MiB | 2.10 MiB | 533.44 KiB |
| cf17b6c | 1.58 MiB | 2.10 MiB | 533.43 KiB |
Member
Author
|
Log4j2 lookups work for log message with However this is disabled by default due to log4shell It just shows |
Member
Author
|
Logback encoder also seems to be working with an encoder that replaces every other char with |
Contributor
|
One more question, would it make sense to have unit tests for the change here? |
lbloder
approved these changes
Sep 1, 2025
lcian
approved these changes
Sep 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

📜 Description
Only set template attribute for logging integrations if the formatted message differs from the template.
💡 Motivation and Context
Closes #4675
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps