static void trackRequest(RequestTelemetry requestTelemetry) { // Track the duration if (requestTelemetry.Timestamp != null) { requestTelemetry.Duration = DateTime.Now - requestTelemetry.Timestamp; } // Due to a bug in app insights, each telemetry client should send a different event instance otherwise it will be sent to the same app. var requestTelemetryCopy = (RequestTelemetry)requestTelemetry.DeepClone(); if (telemetryClient != null) { telemetryClient.TrackRequest(requestTelemetry); } challengeTelemetryClient.TrackRequest(requestTelemetryCopy); }