You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicstaticvoidMain(){varhost=Host.CreateDefaultBuilder().ConfigureLogging(logging =>logging.ClearProviders()).UseElasticApm().Build();varlogger=(ILogger)host.Services.GetService(typeof(ILogger<object>));logger.LogError(newException(),"error log with exception");}
The text was updated successfully, but these errors were encountered:
APM Agent version
Elastic.Apm 1.9.0
Elastic.Apm.Extensions.Hosting 1.9.0
Elastic.Apm.Extensions.Logging 1.9.0
Environment
.NET Core 3.1
Describe the bug
ApmErrorLogger
passes a null logger toStacktraceHelper.GenerateApmStackTrace
(second arg)apm-agent-dotnet/src/Elastic.Apm.Extensions.Logging/ApmErrorLogger.cs
Lines 45 to 46 in 4591f02
which then causes a NullReferenceException. Several try/catch keep the exception from reaching user code though.
apm-agent-dotnet/src/Elastic.Apm/Helpers/StacktraceHelper.cs
Line 51 in 4591f02
To Reproduce
The text was updated successfully, but these errors were encountered: