Fixed log template resulting in nullreference exception#2560
Merged
Conversation
|
💚 CLA has been signed |
|
👋 @JTeeuwissen Thanks a lot for your contribution! It may take some time before we review a PR, so even if you don’t see activity for some time, it does not mean that we have forgotten about it. Every once in a while we go through a process of prioritization, after which we are focussing on the tasks that were planned for the upcoming milestone. The prioritization status is typically reflected through the PR labels. It could be pending triage, a candidate for a future milestone, or have a target milestone set to it. |
stevejgordon
approved these changes
Mar 5, 2025
Contributor
|
Thanks @JTeeuwissen |
stevejgordon
approved these changes
Mar 13, 2025
Contributor
stevejgordon
left a comment
There was a problem hiding this comment.
Nice catch. Thanks for submitting this PR.
Contributor
Author
|
@stevejgordon any chance this pr can be merged? |
Contributor
|
run docs-build |
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.
The escaped log template does not match the log arguments. This causes a nullreference exception with serilog, since the
LogValuesFormattercreates aLogValueswhere the last item is null.https://github.com/elastic/apm-agent-dotnet/blob/36670d5760fe0128e2082dc6918be4c40a3f0efc/src/Elastic.Apm/Logging/LogValuesFormatter.cs#L182C3-L198C4