Skip to content

[BUG] TelemetryConfiguration compatibility for Application Insights 3.x #771

Description

@ApacheTech

Describe the bug
The project is still using InstrumentKey based construction for it's TelemetryClient. The constructor has been removed in 3.x. As addressed in microsoft/ApplicationInsights-dotnet#2560

This affects:

To Reproduce

  1. Reference MarkMpn.Sql4Cds.Engine within a project using Microsoft.ApplicationInsights 3.x.
  2. Create a concrete instance of CommandBase

Expected behaviour
The instance should be created.

Additional context
Using ConnectionString based construction for the client will be compatible with Application Insights 2.x and 3.x.

_ai = new TelemetryClient(new TelemetryConfiguration
{
    ConnectionString = "InstrumentationKey=79761278-a908-4575-afbf-2f4d82560da6"
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions