private void SetUpTelemetryCallbacks() { CorrelationTraceClient.SetUp( (TraceContextBase requestTraceContext) => { requestTraceContext.Stop(); var requestTelemetry = requestTraceContext.CreateRequestTelemetry(); this.telemetryClient.TrackRequest(requestTelemetry); }, (TraceContextBase dependencyTraceContext) => { dependencyTraceContext.Stop(); var dependencyTelemetry = dependencyTraceContext.CreateDependencyTelemetry(); this.telemetryClient.TrackDependency(dependencyTelemetry); }, (Exception e) => { this.telemetryClient.TrackException(e); }); }
private void SetUpTelemetryCallbacks() { var resolvedSiteName = this.nameResolver?.Resolve("WEBSITE_SITE_NAME")?.ToLower() ?? string.Empty; CorrelationTraceClient.SetUp( (TraceContextBase requestTraceContext) => { requestTraceContext.Stop(); var requestTelemetry = requestTraceContext.CreateRequestTelemetry(resolvedSiteName); this.telemetryClient.TrackRequest(requestTelemetry); }, (TraceContextBase dependencyTraceContext) => { dependencyTraceContext.Stop(); var dependencyTelemetry = dependencyTraceContext.CreateDependencyTelemetry(); this.telemetryClient.TrackDependency(dependencyTelemetry); }, (Exception e) => { this.telemetryClient.TrackException(e); }); }