Skip to content

Conversation

noahfalk
Copy link
Member

The spec didn't accurately describe the encoding of field definitions inside the V2 Params area of NetTrace V5 metadata. I am updating the doc to align it with what the CLR generates and what TraceEvent parses.
Reference source for the parser:

if (fieldLayoutVersion >= EventPipeFieldLayoutVersion.FileFormatV5OptionalParamsTag)
{
int fieldLength = reader.ReadInt32();
long streamOffset = reader.StreamOffset;
SpanReader fieldReader = new SpanReader(reader.ReadBytes(fieldLength - 4), streamOffset);
fieldName = fieldReader.ReadNullTerminatedUTF16String();
payloadFetch = ParseType(ref fieldReader, offset, fieldName, fieldLayoutVersion);
}

@brianrob brianrob merged commit 15b703d into main Oct 7, 2025
9 checks passed
@brianrob brianrob deleted the noahfalk-patch-1 branch October 7, 2025 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants