Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize modules only from Active configuration #105

Merged
merged 2 commits into from
Nov 10, 2015

Conversation

abaranch
Copy link
Contributor

  • Initialize modules collection only when active configuration is accessed and do not initialize it for CreateDefault (Otherwise if application uses both autocollection with ai.config and code instrumentation, telemetry modules are initialized with first configuration accessed that may lead to sending telemetry to the wrong iKey)
  • Remove dependency on modules singleton from configuration factory
  • Add unit tests for telemetry modules

using Microsoft.ApplicationInsights.Channel;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.ApplicationInsights.Extensibility.Implementation.Platform;

internal class TelemetryConfigurationFactory
{
protected string configurationFileContent;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's not keep file content in memory for the entire life of the program.

@SergeyKanzhelev
Copy link
Contributor

:shipit:

abaranch added a commit that referenced this pull request Nov 10, 2015
Initialize modules only from Active configuration
@abaranch abaranch merged commit 076d5db into develop Nov 10, 2015
@abaranch abaranch deleted the abaranch/initModules branch November 25, 2015 00:54
TimothyMothra pushed a commit that referenced this pull request Oct 25, 2019
Release 2.3 version for diagnostic source listener only
TimothyMothra pushed a commit that referenced this pull request Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants