ecs-dotnet
ecs-dotnet copied to clipboard
[BUG] Metadata EventId.Name not being set
ECS integration/library project(s) (e.g. Elastic.CommonSchema.Serilog): Serilog.Sinks.ElasticSearch
ECS schema version (e.g. 1.4.0): 8.11.1
ECS .NET assembly version (e.g. 1.4.2): 8.11.1
Elasticsearch version (if applicable): 8
.NET framework / OS: .NET 8/Windows
Description of the problem, including expected versus actual behavior:
After upgrading from the 8.11.0 to 8.11.1, it seems like the Microsoft.Extensions.Logging.EventId.Name is not being mapped to metadata.EventId.Name anymore
Here's is some sample snippets of an event definition:
public static readonly EventId SystemEventHandled = new(LoggingConstants.RuntimeEvents + 78, nameof(SystemEventHandled));
private static readonly Action<ILogger, string, Exception> _systemEventHandled = LoggerMessage.Define<string>(
LogLevel.Information, RuntimeEvents.SystemEventHandled, "{EventAction}");
Here is the output of events logged using 8.11.0 as seen in Kibana. Notice that the metadata.EventId.Name is set (4th column)
Here is the output of events after updating to 8.11.1. Notice that the metadata.EventId.Name is now not being set
No code changes where made except for updating the NuGet package reference for Elastic.CommonSchema.Serilog from 8.11.0 to 8.11.1