-
Notifications
You must be signed in to change notification settings - Fork 293
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
Error on handling AddSingletonIfNotExists (AddApplicationInsightsTelemetryWorkerService) #2921
Comments
Solution is adding
|
We encountered this issue after upgrading to .NET 9, along with many other NuGet packages. At first, we got an error saying the instrumentation key was invalid, but after debugging and noticing the IDE breaking in the call to The solution was to place the
This is related to #2915. |
It has been solved on the PR: #2908 |
I have a service on the
ServiceCollection
that has noImplementationType
and noImplementationInstance
.It is a
KeyedImplementationType
ApplicationInsights-dotnet/NETCORE/src/Shared/Extensions/ApplicationInsightsExtensions.cs
Lines 293 to 301 in e34286b
Than the
ImplementationInstance.GetType()
returns an error.System.NullReferenceException: 'Object reference not set to an instance of an object.'
The problem is that the DiagnosticsTelemetryModule is not registred to the ServiceProvider.
repro ..
use Scrutor >=5.0.2 for adding decorators
add services
add decorators for specific open generic interfaces. cq
services.Decorate(typeof(IMessageHandler<>), typeof({yourdecoratortype<>}));
The text was updated successfully, but these errors were encountered: