/// <summary> /// Initializes a new instance of the <see cref="ProfilerSqlProcessing"/> class. /// </summary> internal ProfilerSqlProcessing(TelemetryConfiguration configuration, string agentVersion, ObjectInstanceBasedOperationHolder telemetryTupleHolder) { if (configuration == null) { throw new ArgumentNullException("configuration"); } if (telemetryTupleHolder == null) { throw new ArgumentNullException("telemetryHolder"); } this.TelemetryTable = telemetryTupleHolder; this.telemetryClient = new TelemetryClient(configuration); // Since dependencySource is no longer set, sdk version is prepended with information which can identify whether RDD was collected by profiler/framework // For directly using TrackDependency(), version will be simply what is set by core string prefix = "rdd" + RddSource.Profiler + ":"; this.telemetryClient.Context.GetInternalContext().SdkVersion = SdkVersionUtils.GetSdkVersion(prefix); if (!string.IsNullOrEmpty(agentVersion)) { this.telemetryClient.Context.GetInternalContext().AgentVersion = agentVersion; } }
/// <summary> /// Initializes a new instance of the <see cref="ProfilerHttpProcessing"/> class. /// </summary> public ProfilerHttpProcessing(TelemetryConfiguration configuration, string agentVersion, ObjectInstanceBasedOperationHolder telemetryTupleHolder, bool setCorrelationHeaders, ICollection<string> correlationDomainExclusionList) { if (configuration == null) { throw new ArgumentNullException("configuration"); } if (telemetryTupleHolder == null) { throw new ArgumentNullException("telemetryTupleHolder"); } if (correlationDomainExclusionList == null) { throw new ArgumentNullException("correlationDomainExclusionList"); } this.applicationInsightsUrlFilter = new ApplicationInsightsUrlFilter(configuration); this.TelemetryTable = telemetryTupleHolder; this.telemetryClient = new TelemetryClient(configuration); this.correlationDomainExclusionList = correlationDomainExclusionList; this.setCorrelationHeaders = setCorrelationHeaders; // Since dependencySource is no longer set, sdk version is prepended with information which can identify whether RDD was collected by profiler/framework // For directly using TrackDependency(), version will be simply what is set by core string prefix = "rdd" + RddSource.Profiler + ":"; this.telemetryClient.Context.GetInternalContext().SdkVersion = SdkVersionUtils.GetSdkVersion(prefix); if (!string.IsNullOrEmpty(agentVersion)) { this.telemetryClient.Context.GetInternalContext().AgentVersion = agentVersion; } }
private DependencyTableStore() { #if !NET40 this.WebRequestCacheHolder = new CacheBasedOperationHolder(); this.SqlRequestCacheHolder = new CacheBasedOperationHolder(); #endif this.WebRequestConditionalHolder = new ObjectInstanceBasedOperationHolder(); this.SqlRequestConditionalHolder = new ObjectInstanceBasedOperationHolder(); }
/// <summary> /// Initializes a new instance of the <see cref="ProfilerHttpProcessing"/> class. /// </summary> public ProfilerHttpProcessing(TelemetryConfiguration configuration, string agentVersion, ObjectInstanceBasedOperationHolder telemetryTupleHolder) { if (configuration == null) { throw new ArgumentNullException("configuration"); } if (telemetryTupleHolder == null) { throw new ArgumentNullException("telemetryTupleHolder"); } this.applicationInsightsUrlFilter = new ApplicationInsightsUrlFilter(configuration); this.TelemetryTable = telemetryTupleHolder; this.telemetryClient = new TelemetryClient(configuration); // Since dependencySource is no longer set, sdk version is prepended with information which can identify whether RDD was collected by profiler/framework // For directly using TrackDependency(), version will be simply what is set by core this.telemetryClient.Context.GetInternalContext().SdkVersion = string.Format(CultureInfo.InvariantCulture, "rdd{0}: {1}", RddSource.Profiler, SdkVersionUtils.GetAssemblyVersion()); if (!string.IsNullOrEmpty(agentVersion)) { this.telemetryClient.Context.GetInternalContext().AgentVersion = agentVersion; } }
public void TestInitialize() { this.telemetryTuple = new Tuple<DependencyTelemetry, bool>(new DependencyTelemetry(), true); this.objectInstanceBasedOperationHolder = new ObjectInstanceBasedOperationHolder(); this.webRequest = WebRequest.Create(new Uri("http://bing.com")); }