ecs-dotnet icon indicating copy to clipboard operation
ecs-dotnet copied to clipboard

[BUG] Incorrect Value on UserAgent Name Field

Open mustafacagataytulun opened this issue 3 years ago • 0 comments

ECS integration/library project(s) (e.g. Elastic.CommonSchema.Serilog): Elastic.CommonSchema.Serilog

ECS schema version (e.g. 1.4.0): All

ECS .NET assembly version (e.g. 1.4.2): Since the initial version

Elasticsearch version (if applicable): N/A

.NET framework / OS: All supported versions

Description of the problem, including expected versus actual behavior:

name subfield of user_agent field should be filled only with the browser name, e.g. Firefox, according to ECS specification. However, in current implementation, this field is filled with full user agent string, e.g. Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0.

Steps to reproduce:

  1. Map the HttpContextAccessor to the EcsTextFormatterConfiguration.
  2. Trigger a log.
  3. See that user_agent.name is filled with full user agent string.

image

I want to open a PR to correct this if it is ok for you.

mustafacagataytulun avatar Feb 08 '22 13:02 mustafacagataytulun