From 772fab666e78cde10c182a40421d6a2c2a1b1a7f Mon Sep 17 00:00:00 2001 From: Juan Sebastian Hoyos Ayala Date: Thu, 10 Apr 2025 18:03:30 -0700 Subject: [PATCH] Fix rundown default --- .../CommandLine/Commands/CollectCommand.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Tools/dotnet-trace/CommandLine/Commands/CollectCommand.cs b/src/Tools/dotnet-trace/CommandLine/Commands/CollectCommand.cs index a2ce18c484..cbda63ff98 100644 --- a/src/Tools/dotnet-trace/CommandLine/Commands/CollectCommand.cs +++ b/src/Tools/dotnet-trace/CommandLine/Commands/CollectCommand.cs @@ -377,12 +377,10 @@ private static async Task Collect(CancellationToken ct, CommandLineConfigur stoppingEventProviderName, stoppingEventEventName, payloadFilter, - onEvent: (traceEvent) => - { + onEvent: (traceEvent) => { shouldExit.Set(); }, - onPayloadFilterMismatch: (traceEvent) => - { + onPayloadFilterMismatch: (traceEvent) => { ConsoleWriteLine($"One or more field names specified in the payload filter for event '{traceEvent.ProviderName}/{traceEvent.EventName}' do not match any of the known field names: '{string.Join(' ', traceEvent.PayloadNames)}'. As a result the requested stopping event is unreachable; will continue to collect the trace for the remaining specified duration."); }, eventStream: new PassthroughStream(session.EventStream, fs, (int)buffersize, leaveDestinationStreamOpen: true), @@ -620,7 +618,7 @@ public static Command CollectCommand() private static readonly Option OutputPathOption = new("--output", "-o") { - Description = $"The output path for the collected trace data. If not specified it defaults to '__.nettrace', e.g., 'myapp_20210315_111514.nettrace'.", + Description = $"The output path for the collected trace data. If not specified it defaults to '__.nettrace', e.g., 'myapp_20210315_111514.nettrace'.", DefaultValueFactory = _ => new FileInfo(DefaultTraceName) }; @@ -699,10 +697,10 @@ public static Command CollectCommand() Description = @"A string, parsed as [payload_field_name]:[payload_field_value] pairs separated by commas, that will stop the trace upon hitting an event with a matching payload. Requires `--stopping-event-provider-name` and `--stopping-event-event-name` to be set." }; - private static readonly Option RundownOption = + private static readonly Option RundownOption = new("--rundown") { - Description = @"Collect rundown events unless specified false." + Description = @"Collect rundown events unless specified false." }; private static readonly Option DSRouterOption =