"dotnet-trace convert --format NetTrace" not working: Error: "--format is required." Works fine for other two formats
Type of issue
Typo
Description
Here I copied from console window.
PS C:\git\logTrace\Pluralsight-Otel-Backend\Basket.API> dotnet-trace convert --format Chromium .\Basket.API.exe_20240214_152204.nettrace
Writing: C:\git\logTrace\Pluralsight-Otel-Backend\Basket.API\Basket.API.exe_20240214_152204.chromium.json
Conversion complete
PS C:\git\logTrace\Pluralsight-Otel-Backend\Basket.API> dotnet-trace convert --format NetTrace .\Basket.API.exe_20240214_152204.nettrace
--format is required.
PS C:\git\logTrace\Pluralsight-Otel-Backend\Basket.API> dotnet-trace convert --format Speedscope .\Basket.API.exe_20240214_152204.nettrace
Writing: C:\git\logTrace\Pluralsight-Otel-Backend\Basket.API\Basket.API.exe_20240214_152204.speedscope.json
Conversion complete
See, --format NetTrace is the only one not working. Other two formats works
Page URL
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-trace
Content source URL
https://github.com/dotnet/docs/blob/main/docs/core/diagnostics/dotnet-trace.md
Document Version Independent Id
3e7ab61f-5a06-b92c-5c74-0fae43adb35e
Article author
@tommcdon
Metadata
- ID: 57216dad-d87d-eeef-adc8-82bfe4251343
- Service: dotnet-fundamentals
@hoyosjs @mdh1418
Hi @RyanLiu99, thanks for the catch! Just to clarify, the dotnet-trace convert tool currently can only convert from .nettrace (NetTrace) file format to the other formats Speedscope and Chromium.
The docs are indeed misleading as converting a .nettrace (which is always emitted during the dotnet-trace collect process) into a .nettrace is redundant, and the docs should be updated to probably remove that file format option from dotnet-trace convert for now.
It is not just this page https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-trace.
It is also about the output of "--help" of the tool itself, guess that is the page based.
`PS C:> dotnet-trace convert --help convert: Converts traces to alternate formats for use with alternate trace analysis tools. Can only convert from the nettrace format
Usage:
dotnet-trace convert [options] [
Arguments:
Options:
--format <Chromium|NetTrace|Speedscope> Sets the output format for the trace file conversion.
-o, --output