Skip to content

Commit 0e3b74a

Browse files
authored
Update NetTraceFormat.md (#2273)
Add missing info about LabelList ID 0 being the empty list
1 parent 9268be2 commit 0e3b74a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/TraceEvent/EventPipe/NetTraceFormat.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ The LabelList block, BlockHeader.Kind=8, contains a set of key-value pairs that
446446

447447
The content of a LabelListBlock is:
448448

449-
- firstIndex - uint32 // The index of the first entry in the block. Each successive entry is implicitly indexed by the previous entry's index + 1.
449+
- firstIndex - uint32 // The index of the first entry in the block. Each successive entry is implicitly indexed by the previous entry's index + 1. firstIndex must be >= 1.
450450
- count - uint32 // The number of entries in the block.
451451
- Concatenated sequence of label_lists, each of which is:
452452
- one or more Label entries each of which is:
@@ -471,6 +471,8 @@ If the high bit of the Kind field is set that demarcates that this is the last l
471471
Similar to StackBlock, references to a row in the LabelListBlock are only valid in the file after the LabelListBlock that defines it and before the next SequencePoint block.
472472
This prevents the reader from needing a lookup table that grows indefinitely with file length or requiring the reader to search the entire file to resolve a given label list index.
473473

474+
An empty LabelList can't be explicitly encoded in the LabelListBlock, but implicitly the LabelList index 0 refers to an empty LabelList.
475+
474476
## Changes relative to older file format versions
475477

476478
### Versions 1-3
@@ -556,4 +558,4 @@ There was no way to add new optional fields that are independent of the event ty
556558
In particular OpenTelemetry has embraced the W3C TraceContext standard for distributed tracing and I'd like to be able to use that as a common correlation identifier in the future.
557559

558560
1. Adds a new LabelListBlock to store key-value pairs that can be referenced by index within the EventHeader.
559-
2. Removes the ActivityId and RelatedActivityId fields from the EventHeader and replaces them with a LabelListIndex field. Activity ids can be stored within the LabelList.
561+
2. Removes the ActivityId and RelatedActivityId fields from the EventHeader and replaces them with a LabelListIndex field. Activity ids can be stored within the LabelList.

0 commit comments

Comments
 (0)