While using EventHubTrigger Azurefunction such a ugly exception received (As below) in telemetry traces of ApplicationInsights.
AI (Internal): [Microsoft-ApplicationInsights-Core] EventSourceException while processing event "LogVerbose": System.NullReferenceException:Object reference not set to an instance of an object.
Details :
timestamp [UTC] : 2019-01-24T04:10:02.5700507Z
message : AI (Internal): [Microsoft-ApplicationInsights-Core] EventSourceException while processing event "LogVerbose": System.NullReferenceException:Object reference not set to an instance of an object.
sdkVersion: dotnet:2.8.1-22898
https://github.com/Microsoft/ApplicationInsights-dotnet/issues/973
The recommended workaround is to use 2.7.2 of Application Insights dependency.
For now, the options are:
- use the same version of AppInsihgts that Functions use (or lower)
- Filter out internal SDK messages. You can do this by creating and configuring telemetry processor. You can have a filter that checks if telemetry is TraceTelemetry and traceTelemetry.Context.Operation.SyntheticSource is SDKTelemetry
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.7.2" />
Otherwise there is pretty much nothing except to wait and hope that version 2.9 will contain a bugfix for this.
As I have mentioned the link in comment regarding open GitHub issue: https://github.com/Microsoft/ApplicationInsights-dotnet/issues/1029
And @Alex AIT shared a link which is an open issue related the same problem : https://github.com/Microsoft/ApplicationInsights-dotnet/issues/973
However, I found a concrete answer with the reference of Microsoft Docs: Application Insights for Azure Functions supported features
In summary:
According to the reference by Microsoft Docs on Supported feature on azure function V2 with Application Insight, If you want to use Application Insight then set an Application Insights version 2.7.2 rather than 2.8.0 and 2.8.1. Some issues are responsible due to the Application Insights version: 2.8.0 and 2.8.1. So, we should use Application Insight version 2.7.2 till the new update is not coming from Microsoft/stable version for V2.
Other Exceptions faced with Application Insights 2.8.1 such as
Now, which is resolved via to degrade the Application Insights version as 2.7.2 which is actually supported to Azure function V2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With