/// <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 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; } }
internal FrameworkHttpProcessing(TelemetryConfiguration configuration, CacheBasedOperationHolder 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.Framework, SdkVersionUtils.GetAssemblyVersion()); }