Sitelet https://github.com/microsoft/ApplicationInsights-aspnetcore/issues/988
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.

Provide disable/enable flag in ApplicationInsightsServiceOptions for each TelemetryModule present in default list. #988

Description

This will make it easy to remove any default telemetry modules.

The current way to remove a module is:
var performanceCounterService = services.FirstOrDefault(t => t.ImplementationType == typeof(PerformanceCollectorModule));
if (performanceCounterService != null)
{
services.Remove(performanceCounterService);
}

Proposed way to remove, for example, DependencyCollection would be:

   var aiOptions  = new ApplicationInsightsServiceOptions();
    // Disables adaptive sampling.
    aiOptions.EnableDependencyCollection = false;
    services.AddApplicationInsightsTelemetry(aiOptions);

There are around 7 modules present by default, and hence there should be 7 new fields with all modules enabled by default.

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