-
Notifications
You must be signed in to change notification settings - Fork 65
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
Serilog dupe stackframe fix #1076
Conversation
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.
I think it would be vital to cover both of these stack depth use cases in integration tests so we don't introduce a regression or new bug if we refactor the current approach.
src/Agent/NewRelic/Agent/Extensions/Providers/Wrapper/Logging/SerilogWrapper.cs
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.
Thank you for adding comments! There are a few minor typos in them but I can live with that.
This needs integration test coverage still.
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.
We did a code walk through and addressed all of the concerned. This is good to go.
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.
Great fix! Reviewed as a team and I approve.
Thank you for submitting a pull request. Please review our contributing guidelines and code of conduct.
Description
Updates serilog wrapper to check for duplicate log entries by looking at the stackframes and checking for additional "Dispatch" methods.
There are two different versions of the stack trace, one that places the initial Dispatch method at 7 and one that places it at 8. The logic in the wrapper handles this.
Tests all pass and performance is acceptable (let me know if you want to go over it)
Closes #1070
Author Checklist
Reviewer Checklist