Closed kaseidu closed 1 year ago
Thanks for reporting this issue! will look at rectifying this this week.
I am facing the same issue in Elastic.Apm.SerilogEnricher when not providing an ElasticApmServiceNodeName. This seems to share the same code.
Opened to https://github.com/elastic/ecs-dotnet/pull/306 to address this.
ECS integration/library project(s): Elastic.CommonSchema.Serilog ECS schema version: 8.6.0 ECS .NET assembly version: 8.6.0 .NET framework / OS: Windows
Description of the problem, including expected versus actual behavior:
I first encountered this in my own application but it's also present in the example project. Running the aspnetcore-with-serilog example from this repo not setting ElasticApm:ServiceNodeName will throw a NullReferenceException when starting/browsing to the application URL. It occurs in
Elastic.CommonSchema.Serilog/LogEventConverter.cs
at line 80.Steps to reproduce: