Skip to content
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

Restore Logging of Client Agents: Fix for Breaking Change in Serilog.Enrichers.ClientInfo v2.0.0 #454

Merged
merged 1 commit into from
Jul 23, 2023

Conversation

Bram1903
Copy link
Collaborator

Pull Request to Restore Logging of Client Agents

This pull request aims to address a breaking change introduced in version 2.0.0 of the Serilog.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:

serilogConfig.Enrich.WithClientAgent();

However, with the new version, the approach to retrieve user agents has been updated, and now it requires the following configuration:

serilogConfig.Enrich.WithRequestHeader("User-Agent");

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.

@Bram1903 Bram1903 added Bug Something isn't working Enhancement New feature or request labels Jul 23, 2023
@Bram1903 Bram1903 requested a review from neozhu July 23, 2023 10:49
@Bram1903 Bram1903 self-assigned this Jul 23, 2023
Copy link
Owner

@neozhu neozhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@neozhu neozhu merged commit 497a7a9 into neozhu:main Jul 23, 2023
3 checks passed
@Bram1903 Bram1903 deleted the FixBreakingClientAgentEnricher branch July 23, 2023 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants