This repository contains the source code for .NET Monitor - a tool that allows you to gather diagnostic data from running applications using HTTP endpoints
CollectionRulePipeline_EventMeterTriggerTest_Histogram_GreaterThan has been very flaky lately, it's being disabled for now but should be investigated and fixed.
Test failure: System.Threading.Tasks.TaskCanceledException : A task was canceled.
Output:
Starting server endpoint info source at '3078e274-d4d9-489d-86c5-8e4ff2edee09'.
[Wait:Add] Register App1
[Wait:Add] Wait for App1 notification
[App1] Path: C:\h\w\A42D0911\p\Microsoft.Diagnostics.Monitoring.UnitTestApp\Release\net9.0\Microsoft.Diagnostics.Monitoring.UnitTestApp.dll
[App1] Args: Metrics
[App1] Begin Environment:
[App1] - COMPlus_EnableDiagnostics = 1
[App1] - DOTNET_DiagnosticPorts = 3078e274-d4d9-489d-86c5-8e4ff2edee09
[App1] End Environment:
[App1] Starting...
[App1] Process ID: 3868
[Source:Add] Start notifications for PID=3868, Cookie=eb3e3822-c6b0-4a08-ad21-92c710443969
[Source:Add] Checking App1
[Source:Add] Notifying App1
[Source:Add] Finished notifications for PID=3868, Cookie=eb3e3822-c6b0-4a08-ad21-92c710443969
[Wait:Add] Received App1 notification
Begin Configuration:
CollectionRules:TestPipelineRule:Trigger:Type = EventMeter
CollectionRules:TestPipelineRule:Trigger:Settings:MeterName = P1
CollectionRules:TestPipelineRule:Trigger:Settings:InstrumentName = test-histogram
CollectionRules:TestPipelineRule:Trigger:Settings:GreaterThan = 0
CollectionRules:TestPipelineRule:Trigger:Settings:SlidingWindowDuration = 00:00:02
CollectionRules:TestPipelineRule:Trigger:Settings:HistogramPercentile = 95
CollectionRules:TestPipelineRule:Actions:0:Type = CallbackAction
GlobalCounter:IntervalSeconds = 1
End Configuration
[Logger:Microsoft.Diagnostics.Tools.Monitor.CollectionRules.CollectionRuleService][Id:61] When using collection rules, the diagnostic port must be in 'Listen' mode. Please correct the configuration and restart dotnet monitor.
[Logger:Microsoft.Hosting.Lifetime][Id:0] Application started. Press Ctrl+C to shut down.
[Logger:Microsoft.Hosting.Lifetime][Id:0] Hosting environment: Production
[Logger:Microsoft.Hosting.Lifetime][Id:0] Content root path: C:\h\w\A42D0911\p\Microsoft.Diagnostics.Monitoring.Tool.UnitTests\Release\net9.0\
[Test] Registering Callback1.
[Logger:Microsoft.Diagnostics.Tools.Monitor.CollectionRules.CollectionRuleService][Id:35] Collection rule 'TestPipelineRule' trigger 'EventMeter' started.
[Logger:Microsoft.Diagnostics.Tools.Monitor.CollectionRules.CollectionRuleService][Id:36] Collection rule 'TestPipelineRule' trigger 'EventMeter' completed.
[Logger:Microsoft.Diagnostics.Tools.Monitor.CollectionRules.CollectionRuleService][Id:33] Collection rule 'TestPipelineRule' action 'CallbackAction' started.
[Callback] Completing 1 source(s).
[Callback] Begin completing Callback1.
[Callback] End completing Callback1.
[Logger:Microsoft.Diagnostics.Tools.Monitor.CollectionRules.CollectionRuleService][Id:34] Collection rule 'TestPipelineRule' action 'CallbackAction' completed.
[Logger:Microsoft.Diagnostics.Tools.Monitor.CollectionRules.CollectionRuleService][Id:39] Collection rule 'TestPipelineRule' actions completed.
[Logger:Microsoft.Diagnostics.Tools.Monitor.CollectionRules.CollectionRuleService][Id:35] Collection rule 'TestPipelineRule' trigger 'EventMeter' started.
Action execution times:
- 14:44:25.2073002
[Logger:Microsoft.Hosting.Lifetime][Id:0] Application is shutting down...
[App1] Waiting for exit...
[App1] Stopping...
[App1] Already stopped.
[App1] Already exited.
[App1] Exit Code: -1
[App1] Begin Standard Output:
[App1] {"EventId":1,"Level":"Information","Category":"Microsoft.Diagnostics.Monitoring.UnitTestApp.Program","Message":"State: Ready","State":{"Message":"State: Ready","State":"Ready","{OriginalFormat}":"State: {State}"}}
[App1] {"EventId":1,"Level":"Information","Category":"Microsoft.Diagnostics.Monitoring.UnitTestApp.Program","Message":"State: Waiting","State":{"Message":"State: Waiting","State":"Waiting","{OriginalFormat}":"State: {State}"}}
[App1] {"EventId":2,"Level":"Debug","Category":"Microsoft.Diagnostics.Monitoring.UnitTestApp.Program","Message":"Received command: StartScenario; Expected: True","State":{"Message":"Received command: StartScenario; Expected: True","Command":"StartScenario","Expected":true,"{OriginalFormat}":"Received command: {Command}; Expected: {Expected}"}}
[App1] {"EventId":1,"Level":"Information","Category":"Microsoft.Diagnostics.Monitoring.UnitTestApp.Program","Message":"State: Executing","State":{"Message":"State: Executing","State":"Executing","{OriginalFormat}":"State: {State}"}}
[App1] {"EventId":1,"Level":"Information","Category":"Microsoft.Diagnostics.Monitoring.UnitTestApp.Program","Message":"State: Waiting","State":{"Message":"State: Waiting","State":"Waiting","{OriginalFormat}":"State: {State}"}}
[App1] {"EventId":2,"Level":"Debug","Category":"Microsoft.Diagnostics.Monitoring.UnitTestApp.Program","Message":"Received command: Continue; Expected: True","State":{"Message":"Received command: Continue; Expected: True","Command":"Continue","Expected":true,"{OriginalFormat}":"Received command: {Command}; Expected: {Expected}"}}
[App1] {"EventId":1,"Level":"Information","Category":"Microsoft.Diagnostics.Monitoring.UnitTestApp.Program","Message":"State: Finished","State":{"Message":"State: Finished","State":"Finished","{OriginalFormat}":"State: {State}"}}
[App1] {"EventId":1,"Level":"Information","Category":"Microsoft.Diagnostics.Monitoring.UnitTestApp.Program","Message":"State: Waiting","State":{"Message":"State: Waiting","State":"Waiting","{OriginalFormat}":"State: {State}"}}
[App1] {"EventId":2,"Level":"Debug","Category":"Microsoft.Diagnostics.Monitoring.UnitTestApp.Program","Message":"Received command: EndScenario; Expected: True","State":{"Message":"Received command: EndScenario; Expected: True","Command":"EndScenario","Expected":true,"{OriginalFormat}":"Received command: {Command}; Expected: {Expected}"}}
[App1] End Standard Output
[App1] Begin Standard Error:
[App1] End Standard Error
CollectionRulePipeline_EventMeterTriggerTest_Histogram_GreaterThan
has been very flaky lately, it's being disabled for now but should be investigated and fixed.Test failure: System.Threading.Tasks.TaskCanceledException : A task was canceled.
Output: