From ecba7995b7208d782771e771b80ac0a151b5694b Mon Sep 17 00:00:00 2001 From: Joel Dickson Date: Thu, 21 Dec 2023 18:58:20 +0700 Subject: [PATCH] Update AppInsightsProducerEventsHandler.cs --- .../AppInsightsProducerEventsHandler.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/KafkaFlow.ApplicationInsights/AppInsightsProducerEventsHandler.cs b/src/KafkaFlow.ApplicationInsights/AppInsightsProducerEventsHandler.cs index 1717fed..57e67f9 100644 --- a/src/KafkaFlow.ApplicationInsights/AppInsightsProducerEventsHandler.cs +++ b/src/KafkaFlow.ApplicationInsights/AppInsightsProducerEventsHandler.cs @@ -10,6 +10,7 @@ public class AppInsightsProducerEventsHandler public static Task OnProducerStarted(IMessageContext eventContextMessageContext, TelemetryClient telemetryClient) { eventContextMessageContext.Items.Add("timer", Stopwatch.StartNew()); + eventContextMessageContext.Items.Add("telemetryClient return Task.CompletedTask; } @@ -49,4 +50,4 @@ public static Task OnProducerCompleted(IMessageContext eventContextMessageContex theTimer.Elapsed, "200", true); return Task.CompletedTask; } -} \ No newline at end of file +}