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.

iKey is not read from appsettings.json or environment when using AddApplicationInsightsTelemetry() #605

@cijothomas

Description

@cijothomas

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

Repro Steps

  1. VS->New WebApp .net core

  2. Add the following to appsettings.json
    {
    "Logging": {
    "IncludeScopes": false,
    "Debug": {
    "LogLevel": {
    "Default": "Warning"
    }
    },
    "Console": {
    "LogLevel": {
    "Default": "Warning"
    }
    }
    },
    "ApplicationInsights": {
    "InstrumentationKey": "11111111-2222-3333-4444-555555555555"
    }
    }

  3. Enable AI by using AddApplicationInsightsTelemetry(). (Do not pass ikey as argument)

  4. Start app (with or without VS Debugger), and put load.

Actual Behavior

  1. Ikey is not read, and hency no telemetry sent.

Expected Behavior

Ikey should be read from appsettings.json

Version Info

SDK Version : 2.2
.NET Version :
How Application was onboarded with SDK(VisualStudio/StatusMonitor/Azure Extension) : VS
OS : Windows
Hosting Info (IIS/Azure WebApps/ etc) : Self

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions