Restore Logging of Client Agents: Fix for Breaking Change in Serilog.Enrichers.ClientInfo v2.0.0 #454
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.
Pull Request to Restore Logging of Client Agents
This pull request aims to address a breaking change introduced in version
2.0.0
of theSerilog.Enrichers.ClientInfo
NuGet package. The change affected the way client user agents were retrieved, leading to their absence in the logs, despite having privacy settings enabled for logging user agents.Previously, to obtain client user agents, the configuration used to be set as follows:
However, with the new version, the approach to retrieve user agents has been updated, and now it requires the following configuration:
The issue was discovered by @neozhu, who noticed that the logging of client agents was no longer functioning as expected. Upon investigation, it was found that the line responsible for enabling the logging of client agents was inadvertently removed during an update to the resource files. This unintentional change slipped through the review process since it wasn't immediately apparent.
This pull request aims to restore the ability to log client agents by adding back the necessary configuration to enable the logging of user agents.
With this fix, the logs will once again capture valuable client agent information, providing valuable insights and analytics. The privacy settings will continue to be respected while ensuring that essential client agent data is properly logged.
Let's merge this pull request to reinstate the logging of client agents and maintain a comprehensive and accurate log record.