public HttpCoreDiagnosticSourceListener( TelemetryConfiguration configuration, bool setComponentCorrelationHttpHeaders, IEnumerable <string> correlationDomainExclusionList, bool injectLegacyHeaders, bool injectRequestIdInW3CMode, HttpInstrumentationVersion instrumentationVersion) { this.client = new TelemetryClient(configuration); this.client.Context.GetInternalContext().SdkVersion = SdkVersionUtils.GetSdkVersion("rdd" + RddSource.DiagnosticSourceCore + ":"); this.configuration = configuration; this.applicationInsightsUrlFilter = new ApplicationInsightsUrlFilter(configuration); this.setComponentCorrelationHttpHeaders = setComponentCorrelationHttpHeaders; this.correlationDomainExclusionList = correlationDomainExclusionList ?? Enumerable.Empty <string>(); this.injectLegacyHeaders = injectLegacyHeaders; this.httpInstrumentationVersion = instrumentationVersion != HttpInstrumentationVersion.Unknown ? instrumentationVersion : this.GetInstrumentationVersion(); this.injectRequestIdInW3CMode = injectRequestIdInW3CMode; this.subscriber = new HttpCoreDiagnosticSourceSubscriber( this, this.applicationInsightsUrlFilter, this.httpInstrumentationVersion); }
public HttpCoreDiagnosticSourceListener( TelemetryConfiguration configuration, bool setComponentCorrelationHttpHeaders, IEnumerable <string> correlationDomainExclusionList, bool injectLegacyHeaders, bool injectW3CHeaders) { this.client = new TelemetryClient(configuration); this.client.Context.GetInternalContext().SdkVersion = SdkVersionUtils.GetSdkVersion("rdd" + RddSource.DiagnosticSourceCore + ":"); var httpClientVersion = typeof(HttpClient).GetTypeInfo().Assembly.GetName().Version; this.isNetCore20HttpClient = httpClientVersion.CompareTo(new Version(4, 2)) >= 0; this.configuration = configuration; this.applicationInsightsUrlFilter = new ApplicationInsightsUrlFilter(configuration); this.setComponentCorrelationHttpHeaders = setComponentCorrelationHttpHeaders; this.correlationDomainExclusionList = correlationDomainExclusionList ?? Enumerable.Empty <string>(); this.injectLegacyHeaders = injectLegacyHeaders; this.injectW3CHeaders = injectW3CHeaders; this.subscriber = new HttpCoreDiagnosticSourceSubscriber( this, this.applicationInsightsUrlFilter, this.isNetCore20HttpClient); }
public HttpCoreDiagnosticSourceListener( TelemetryConfiguration configuration, string effectiveProfileQueryEndpoint, bool setComponentCorrelationHttpHeaders, IEnumerable <string> correlationDomainExclusionList, ICorrelationIdLookupHelper correlationIdLookupHelper) { this.client = new TelemetryClient(configuration); this.client.Context.GetInternalContext().SdkVersion = SdkVersionUtils.GetSdkVersion("rdd" + RddSource.DiagnosticSourceCore + ":"); this.configuration = configuration; this.applicationInsightsUrlFilter = new ApplicationInsightsUrlFilter(configuration); this.setComponentCorrelationHttpHeaders = setComponentCorrelationHttpHeaders; this.correlationIdLookupHelper = correlationIdLookupHelper ?? new CorrelationIdLookupHelper(effectiveProfileQueryEndpoint); this.correlationDomainExclusionList = correlationDomainExclusionList ?? Enumerable.Empty <string>(); this.subscriber = new HttpCoreDiagnosticSourceSubscriber(this, this.applicationInsightsUrlFilter); }