Open thompson-tomo opened 1 month ago
@Mpdreamz any chance you could take a quick look at removing the case sensitive as it will be a massive gain for me and the library.
I took a slightly different approach and opened: https://github.com/elastic/ecs-dotnet/pull/401
To allow ECS entities to be logged directly, they will always overwrite what was set previously.
Thanks @Mpdreamz appreciate the extensive changes. I assume that if the message generator has ignore null properties, then it won't override it?
Another question is will the solution you have implemented support nested objects which was a big limitation with removing the case sensitivity logic?
ECS integration/library project(s) (e.g. Elastic.CommonSchema.Serilog):
Elastic.CommonSchema.NLog = 8.11.0 but all will be impacted
.NET framework / OS: Net 8
Description of the problem, including expected versus actual behavior: When i pass ECS document fragments into my log generator the properties are only being added under label/metadata. But if i pass the same class with the property names changed to lowercase, the properties are overridden.
Steps to reproduce:
Notes The issue is set the AssignField Method within the EcsDocument is performing a case sensitive comparison hence properties are not being found and results in metadata/labels being used.