[Dotnet Monitor] Small Fix For SDM Triggers (#4332)
authorkkeirstead <85592574+kkeirstead@users.noreply.github.com>
Tue, 17 Oct 2023 20:59:18 +0000 (13:59 -0700)
committerGitHub <noreply@github.com>
Tue, 17 Oct 2023 20:59:18 +0000 (16:59 -0400)
Small bug fix on the dotnet-monitor side from the unification work - we
previously didn't create a payload for `BeginInstrumentReporting`, and
thus only checked that a payload wasn't an error or the end of a
counter. The code now leverages the newly-added `IsValuePublishedEvent`
from the unification to only apply to the correct payloads.

src/Microsoft.Diagnostics.Monitoring.EventPipe/Triggers/SystemDiagnosticsMetricsTrigger/SystemDiagnosticsMetricsTriggerImpl.cs

index d0e4e28087c66d460cfd72f2444d269e2961a6c7..c10d87f1a8014c408315edb68859a49acdc6801b 100644 (file)
@@ -55,7 +55,7 @@ namespace Microsoft.Diagnostics.Monitoring.EventPipe.Triggers.SystemDiagnosticsM
         {
             EventType eventType = payload.EventType;
 
-            if (eventType.IsError() || eventType == EventType.CounterEnded)
+            if (!eventType.IsValuePublishedEvent())
             {
                 // not currently logging the error messages