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
AplicationInsightsLoggerProvider is not catching exceptions and letting them propagate to caller. This can cause applications to crash if an exception occurs inside ApplicationInsightsProvider. This is against the overall SDK principles of never throwing. https://github.com/microsoft/ApplicationInsights-dotnet/blob/develop/LOGGING/src/ILogger/ApplicationInsightsLogger.cs#L79
Proposal : catch and log exception to EventSource.
The text was updated successfully, but these errors were encountered:
This was found another part of AI SDK did not handle exception: https://github.com/microsoft/ApplicationInsights-dotnet/blob/develop/BASE/src/Microsoft.ApplicationInsights/DataContracts/ExceptionTelemetry.cs#L208
Its also important to fix the underlying ExceptionTelemetry class to never throw.
Example exception trace:
2020-07-15T11:33:59.315067545Z System.AggregateException: An error occurred while writing to logger(s). (Invalid assembly public key. (0x8013141E)) 2020-07-15T11:33:59.321326827Z ---> System.Security.SecurityException: Invalid assembly public key. (0x8013141E) 2020-07-15T11:33:59.321343928Z at System.Reflection.RuntimeAssembly.GetFullName(QCallAssembly assembly, StringHandleOnStack retString) 2020-07-15T11:33:59.321350228Z at System.Reflection.RuntimeAssembly.get_FullName() 2020-07-15T11:33:59.321684343Z at Microsoft.ApplicationInsights.Extensibility.Implementation.ExceptionConverter.GetStackFrame(StackFrame stackFrame, Int32 frameId) 2020-07-15T11:33:59.321697944Z at Microsoft.ApplicationInsights.Extensibility.Implementation.ExceptionConverter.SanitizeStackFrame[TInput,TOutput](IList`1 inputList, Func`3 converter, Func`2 lengthGetter) 2020-07-15T11:33:59.321704144Z at Microsoft.ApplicationInsights.Extensibility.Implementation.ExceptionConverter.ConvertToExceptionDetails(Exception exception, ExceptionDetails parentExceptionDetails) 2020-07-15T11:33:59.321717044Z at Microsoft.ApplicationInsights.DataContracts.ExceptionTelemetry.ConvertExceptionTree(Exception exception, ExceptionDetails parentExceptionDetails, List`1 exceptions) 2020-07-15T11:33:59.321721845Z at Microsoft.ApplicationInsights.DataContracts.ExceptionTelemetry.UpdateData(Exception exception) 2020-07-15T11:33:59.321726545Z at Microsoft.ApplicationInsights.DataContracts.ExceptionTelemetry.set_Exception(Exception value) 2020-07-15T11:33:59.321731245Z at Microsoft.ApplicationInsights.DataContracts.ExceptionTelemetry..ctor(Exception exception) 2020-07-15T11:33:59.322066560Z at Microsoft.Extensions.Logging.ApplicationInsights.ApplicationInsightsLogger.Log[TState](LogLevel logLevel, EventId eventId, TState state, Exception exception, Func`3 formatter)
Sorry, something went wrong.
rajkumar-rangaraj
No branches or pull requests
Describe the bug
AplicationInsightsLoggerProvider is not catching exceptions and letting them propagate to caller. This can cause applications to crash if an exception occurs inside ApplicationInsightsProvider. This is against the overall SDK principles of never throwing.
https://github.com/microsoft/ApplicationInsights-dotnet/blob/develop/LOGGING/src/ILogger/ApplicationInsightsLogger.cs#L79
Proposal : catch and log exception to EventSource.
The text was updated successfully, but these errors were encountered: