Skip to content
This repository has been 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

Closed
cijothomas opened this issue Sep 24, 2019 · 0 comments

Comments

@cijothomas
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant