-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
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
NullReferenceException in ApplicationInsightsLogger.Log when exception contains a Data entry with a null value #1436
Comments
Will this fix be released to the pre-installed application insights site extension on Azure app services soon? I'm getting a lot of errors like this running version 2.8.14.189 and I think this fix would resolve the issue?
|
Seems to be fixed in microsoft/ApplicationInsights-aspnetcore#849 I updated to 2.8.0, will update here if I still see any issues. |
If you are reporting bug/issue, please provide detailed Repro instructions.
Repro Steps
Actual Behavior
Response exception in middleware: System.AggregateException: An error occurred while writing to logger(s). (Object reference not set to an instance of an object.) ---> System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.ApplicationInsights.AspNetCore.Logging.ApplicationInsightsLogger.<>c__DisplayClass9_0
1.<Log>b__0(DictionaryEntry item) at System.Collections.Generic.List
1.ForEach(Action1 action) at Microsoft.ApplicationInsights.AspNetCore.Logging.ApplicationInsightsLogger.Log[TState](LogLevel logLevel, EventId eventId, TState state, Exception exception, Func
3 formatter) at Microsoft.Extensions.Logging.Logger.Log[TState](LogLevel logLevel, EventId eventId, TState state, Exception exception, Func3 formatter) --- End of inner exception stack trace --- at Microsoft.Extensions.Logging.Logger.Log[TState](LogLevel logLevel, EventId eventId, TState state, Exception exception, Func
3 formatter) at Microsoft.Extensions.Logging.LoggerExtensions.Log(ILogger logger, LogLevel logLevel, EventId eventId, Exception exception, String message, Object[] args) at Microsoft.Extensions.Logging.LoggerExtensions.LogError(ILogger logger, EventId eventId, Exception exception, String message, Object[] args)Expected Behavior
Logs an exception
Version Info
SDK Version : 2.5.1
.NET Version : .NET core 2.2
How Application was onboarded with SDK(VisualStudio/StatusMonitor/Azure Extension) :
OS : Windows
Hosting Info (IIS/Azure WebApps/ etc) :
The text was updated successfully, but these errors were encountered: