Skip to content

Add "User-Agent" property to Serilog logging #33

@marcominerva

Description

@marcominerva

Enhance Serilog logging by including a property named "User-Agent" that contains the User Agent string from the HTTP request, if available. This will improve traceability and diagnostics by identifying the source of requests.

Proposed Solution:

  • Update the logging logic to extract the User Agent header from the HTTP request (if it exists).
  • Add this value as a property named "User-Agent" in all relevant Serilog log events.

Benefits:

  • Easier analysis of traffic patterns and troubleshooting.
  • More informative logs for auditing and security review.

Acceptance Criteria:

  • The "User-Agent" property is present in log entries when an HTTP request includes a User Agent header.
  • If the header is absent, the property should be omitted or set to null/empty.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions