Please provide a succinct description of the issue.
Repro steps
EventHub message has property “Diagonstic-Id”(distributed tracing is enabled)
EventHub extension > 4.0.1 and < 5.0.0
Function runtime V3
Customer added his own “System.Diagnostics.DiagnosticSource” reference
Expected behavior
EventHub trigger should not break.
Actual behavior
EventHub trigger breaks with:
Exception type System.AggregateException
Exception message Unable to cast object of type 'System.Collections.Generic.List1[System.Diagnostics.Activity]' to type 'System.Collections.Generic.IEnumerable1[System.Diagnostics.Activity]'.
Please provide a succinct description of the issue.
Repro steps
Expected behavior
EventHub trigger should not break.
Actual behavior
EventHub trigger breaks with:
in Microsoft.Azure.WebJobs.Logging.ApplicationInsights/ApplicationInsightsLogger and caused by Microsoft.Azure.WebJobs.Extensions.EventHubs/Listeners/EventHubListener.cs passing a different Activity type
Known workarounds
Related information
Related EventHub trigger issue: https://github.com/Azure/azure-functions-eventhubs-extension/issues/55
The fix should be done in webjobs sdk in the distributed tracing path: