Skip to content

dotnet trace with EtwSelfDescribingEventFormat produces unreadable events #2367

@MihaZupan

Description

@MihaZupan

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

The repro has two EventSources.
FooTelemetry uses EtwSelfDescribingEventFormat and BarTelemetry uses EtwManifestEventFormat.

When using EtwSelfDescribingEventFormat the bool argument will be encoded in the payload as a single byte.
image
image

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

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions