dotnet trace with EtwSelfDescribingEventFormat produces unreadable events
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 404
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 38
Description
When running `dotnet trace` to collect events emitted by an `EventSource` created with `EtwSelfDescribingEventFormat`, the trace file will contain unreadable data for some events.
Repro program: [TraceTest.cs](https://gist.github.com/MihaZupan/986f5cc60bf6b4d64e51de35f3f9a603)
The repro has two `EventSource`s.
`FooTelemetry` uses `EtwSelfDescribingEventFormat` and `BarTelemetry` uses `EtwManifestEventFormat`.
When using `EtwSelfDescribingEventFormat` the `bool` argument will be encoded in the payload as a single byte.


When using `EtwManifestEventFormat`, the `bool` will be encoded as 4 bytes.


Screenshots above are from a trace collected by `dotnet trace` viewed in PerfView - it appears PerfView tries to interpret the bools in the payload as 4 bytes in both cases.
If the traces are instead collected from within PerfView, both formats work fine.
Attaching the traces collected by `dotnet trace` and `PerfView` if it's any help.
You can see `FooTelemetry` is broken for `dotnet trace` while all other configurations work.
[Traces.zip](https://github.com/dotnet/diagnostics/files/6651681/Traces.zip)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.