Skip to content

Null Object when calling AddApplicationInsightsTelemetry / AddSingletonIfNotExists #2927

@michael-paulus-icev

Description

@michael-paulus-icev
  • List of NuGet packages and version that you are using:
  • <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
    
  • Runtime version (e.g. net 8.0): net 8.0
  • Hosting environment local: windows

Describe the bug

After registering a AddResiliencePipeline from the Polly library, it causes an exception be thrown on

https://github.com/microsoft/ApplicationInsights-dotnet/blob/master/NETCORE/src/Shared/Extensions/ApplicationInsightsExtensions.cs

Line:

292

both the ImplementationType && ImplementationInstance are null but ImplementationInstance is not null checked.

This is happening because it is using the KeyedImplementation properties instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions