You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an Asp.Net Core app registers an IHttpClientFactory with the AddStandardResilienceHandler method, and Application insights is added with the AddApplicationInsightsTelemetry method after that, the AI method throws an exception silently, which prevents AI from working.
The exception occurs at line 307 inside the AddCommonTelemetryModules method's first line, the exception that is thrown is an System.InvalidOperationException: 'This service descriptor is keyed. Your service provider may not support keyed services.'
Repro:
Create a new .NET 8 Web Api
Add packages "Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" and "Microsoft.Extensions.Http.Resilience" Version="8.9.1"
Very strange bug, spent a whole day trying to figure out why our AI did not get any telemetry. I then just tried putting the AddApplicationInsightsTelemetry method at the top and it started working.
Could that keyd services check be removed or fixed (since Asp.Net Core 8 DI obviously supports keyd services)?
The text was updated successfully, but these errors were encountered:
When an Asp.Net Core app registers an IHttpClientFactory with the AddStandardResilienceHandler method, and Application insights is added with the AddApplicationInsightsTelemetry method after that, the AI method throws an exception silently, which prevents AI from working.
The exception occurs at line 307 inside the AddCommonTelemetryModules method's first line, the exception that is thrown is an System.InvalidOperationException: 'This service descriptor is keyed. Your service provider may not support keyed services.'
Repro:
Very strange bug, spent a whole day trying to figure out why our AI did not get any telemetry. I then just tried putting the AddApplicationInsightsTelemetry method at the top and it started working.
Could that keyd services check be removed or fixed (since Asp.Net Core 8 DI obviously supports keyd services)?
The text was updated successfully, but these errors were encountered: