We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elastic.Apm 1.9.0 Elastic.Apm.Extensions.Hosting 1.9.0 Elastic.Apm.Extensions.Logging 1.9.0
.NET Core 3.1
ApmErrorLogger passes a null logger to StacktraceHelper.GenerateApmStackTrace (second arg)
ApmErrorLogger
StacktraceHelper.GenerateApmStackTrace
apm-agent-dotnet/src/Elastic.Apm.Extensions.Logging/ApmErrorLogger.cs
Lines 45 to 46 in 4591f02
apm-agent-dotnet/src/Elastic.Apm/Helpers/StacktraceHelper.cs
Line 51 in 4591f02
public static void Main() { var host = Host .CreateDefaultBuilder() .ConfigureLogging(logging => logging.ClearProviders()) .UseElasticApm() .Build(); var logger = (ILogger)host.Services.GetService(typeof(ILogger<object>)); logger.LogError(new Exception(), "error log with exception"); }
The text was updated successfully, but these errors were encountered:
😱
Thanks for reporting it - super useful summary 👍
Opened #1311 to fix it.
Sorry, something went wrong.
gregkalapos
Successfully merging a pull request may close this issue.
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: