docs icon indicating copy to clipboard operation
docs copied to clipboard

"dotnet-trace convert --format NetTrace" not working: Error: "--format is required." Works fine for other two formats

Open RyanLiu99 opened this issue 1 year ago • 3 comments

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

RyanLiu99 avatar Feb 14 '24 23:02 RyanLiu99

@hoyosjs @mdh1418

tommcdon avatar Feb 14 '24 23:02 tommcdon

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.

mdh1418 avatar Feb 15 '24 16:02 mdh1418

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: Input trace file to be converted. Defaults to 'default'. [default: default]

Options: --format <Chromium|NetTrace|Speedscope> Sets the output format for the trace file conversion. -o, --output Output filename. Extension of target format will be added. -?, -h, --help Show help and usage information `

RyanLiu99 avatar Feb 15 '24 21:02 RyanLiu99