/// <summary> /// Initializes a new instance of the <see cref="OperationCorrelationTelemetryInitializer"/> class. /// </summary> /// <param name="httpContextAccessor">Accessor for retrieving the current HTTP context.</param> /// <param name="correlationIdLookupHelper">A store for correlation ids that we don't have to query it everytime.</param> public OperationCorrelationTelemetryInitializer( IHttpContextAccessor httpContextAccessor, ICorrelationIdLookupHelper correlationIdLookupHelper) : base(httpContextAccessor) { if (correlationIdLookupHelper == null) { throw new ArgumentNullException(nameof(correlationIdLookupHelper)); } this.correlationIdLookupHelper = correlationIdLookupHelper; }
public ServiceRemotingServerEventListener(TelemetryConfiguration configuration, string effectiveProfileQueryEndpoint, bool setComponentCorrelationHttpHeaders, ICorrelationIdLookupHelper correlationIdLookupHelper = null) { this.client = new TelemetryClient(configuration); this.client.Context.GetInternalContext().SdkVersion = SdkVersionUtils.GetSdkVersion("serviceremoting:"); this.configuration = configuration; this.effectiveProfileQueryEndpoint = effectiveProfileQueryEndpoint; this.setComponentCorrelationHttpHeaders = setComponentCorrelationHttpHeaders; this.correlationIdLookupHelper = correlationIdLookupHelper ?? new CorrelationIdLookupHelper(effectiveProfileQueryEndpoint); ServiceRemotingServiceEvents.ReceiveRequest += ServiceRemotingServiceEvents_ReceiveRequest; ServiceRemotingServiceEvents.SendResponse += ServiceRemotingServiceEvents_SendResponse; }
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); }
public ServiceRemotingClientEventListener( TelemetryConfiguration configuration, string effectiveProfileQueryEndpoint, bool setComponentCorrelationHttpHeaders, IEnumerable <string> correlationDomainExclusionList = null, ICorrelationIdLookupHelper correlationIdLookupHelper = null) { this.client = new TelemetryClient(configuration); this.client.Context.GetInternalContext().SdkVersion = SdkVersionUtils.GetSdkVersion("rddsr:"); this.configuration = configuration; this.setComponentCorrelationHttpHeaders = setComponentCorrelationHttpHeaders; this.correlationIdLookupHelper = correlationIdLookupHelper ?? new CorrelationIdLookupHelper(effectiveProfileQueryEndpoint); this.correlationDomainExclusionList = correlationDomainExclusionList ?? Enumerable.Empty <string>(); ServiceRemotingClientEvents.SendRequest += ServiceRemotingClientEvents_SendRequest; ServiceRemotingClientEvents.ReceiveResponse += ServiceRemotingClientEvents_ReceiveResponse; }
/// <summary> /// Initializes a new instance of the <see cref="T:HostingDiagnosticListener"/> class. /// </summary> /// <param name="client"><see cref="TelemetryClient"/> to post traces to.</param> /// <param name="correlationIdLookupHelper">A store for correlation ids that we don't have to query it everytime.</param> public HostingDiagnosticListener(TelemetryClient client, ICorrelationIdLookupHelper correlationIdLookupHelper) { this.client = client; this.correlationIdLookupHelper = correlationIdLookupHelper; this.sdkVersion = SdkVersionUtils.VersionPrefix + SdkVersionUtils.GetAssemblyVersion(); }