/// <summary> /// Initializes a new instance of the <see cref="T:TelemetryConfigurationOptionsSetup"/> class. /// </summary> public TelemetryConfigurationOptionsSetup( IServiceProvider serviceProvider, IOptions <ApplicationInsightsServiceOptions> applicationInsightsServiceOptions, IEnumerable <ITelemetryInitializer> initializers, IEnumerable <ITelemetryModule> modules, IEnumerable <ITelemetryProcessorFactory> telemetryProcessorFactories, IEnumerable <ITelemetryModuleConfigurator> telemetryModuleConfigurators) { this.applicationInsightsServiceOptions = applicationInsightsServiceOptions.Value; this.initializers = initializers; this.modules = modules; this.telemetryProcessorFactories = telemetryProcessorFactories; this.telemetryModuleConfigurators = telemetryModuleConfigurators; this.telemetryChannel = serviceProvider.GetService <ITelemetryChannel>(); this.applicationIdProvider = serviceProvider.GetService <IApplicationIdProvider>(); }
/// <summary> /// Configures telemetry module. /// </summary> public void Configure(ITelemetryModule telemetryModule, ApplicationInsightsServiceOptions options) { this.configure?.Invoke(telemetryModule, options); }