Sitelet https://github.com/microsoft/ApplicationInsights-aspnetcore/issues/989
Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.
This repository was 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

Description

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) :

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions