Sitelet https://github.com/microsoft/ApplicationInsights-dotnet/issues/1111#issue-430044175
Skip to content

DiagnosticsTelemetryModule can get added more than once #1111

Description

Repro Steps

  1. Compile and run:
using System;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.ApplicationInsights.Extensibility.Implementation;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            TelemetryConfiguration.Active.Dispose();
            new TelemetryClient();
            Console.WriteLine(TelemetryModules.Instance.Modules.Count);
        }
    }
}

Actual Behavior

Outputs: 2

Expected Behavior

Outputs: 1

Version Info

SDK Version : 2.10.0-beta3
.NET Version : net46, netcoreapp20
How Application was onboarded with SDK(VisualStudio/StatusMonitor/Azure Extension) : VisualStudio
OS : Windows 10
Hosting Info (IIS/Azure WebApps/ etc) : N/A

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions