Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

null/Empty ikey from AIServiceOptions is overriding ikey from appsettings.json #989

Closed
cijothomas opened this issue Sep 24, 2019 · 0 comments

Comments

@cijothomas
Copy link
Contributor

If you are reporting bug/issue, please provide detailed Repro instructions.

Repro Steps

  1. Enable AI:
    var aiOptions = new ApplicationInsightsServiceOptions();
    aiOptions.EnableHeartbeat = false;
    services.AddApplicationInsightsTelemetry(aiOptions);
  2. Provide ikey in appsettings,json

Actual Behavior

ikey from appsettings.json is overwritten by the one in aiOptions which is empty.

Expected Behavior

Do not override aiOptionsIkey unless its not null/non empty.

Version Info

SDK Version (version of https://www.nuget.org/packages/Microsoft.ApplicationInsights.AspNetCore) :
.NET Core Version (TargetFramework in your .csproj file) :
How Application was onboarded with SDK(Installed Nugets/VisualStudio/Azure WebAppExtension) :
OS :
Hosting Info (IIS/Azure Web Apps/Running From Visual Studio etc) :

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant