Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 6e5a773

Browse files
authored
Specify first version and optional/repeated for each field in BinaryEncoding.md. (#25)
The version number is important for serializing field values in version order.
1 parent 6954ef0 commit 6e5a773

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

encodings/BinaryEncoding.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,24 +69,29 @@ and use the default values.
6969

7070
### Trace Context
7171

72-
#### Trace-id
72+
#### Fields added in Trace Context version 0
7373

74+
##### Trace-id
75+
76+
* optional
7477
* `field_id` = 0
7578
* `len` = 16
7679

7780
Is the ID of the whole trace forest. It is represented as an opaque 16-bytes array,
7881
e.g. (in hex), `4bf92f3577b34da6a3ce929d000e4736`. All bytes 0 is considered invalid.
7982

80-
#### Span-id
83+
##### Span-id
8184

85+
* optional
8286
* `field_id` = 1
8387
* `len` = 8
8488

8589
Is the ID of the caller span (parent). It is represented as an opaque 8-bytes array,
8690
e.g. (in hex), `34f067aa0ba902b7`. All bytes 0 is considered invalid.
8791

88-
#### Trace-options
92+
##### Trace-options
8993

94+
* optional
9095
* `field_id` = 2
9196
* `len` = 1
9297

@@ -116,11 +121,13 @@ This corresponds to:
116121

117122
### Tag Context
118123
The Tag Context format uses Varint encoding, which is described in
119-
https://developers.google.com/protocol-buffers/docs/encoding#varints. Note that
120-
there can be multiple tags.
124+
https://developers.google.com/protocol-buffers/docs/encoding#varints.
125+
126+
#### Fields added in Tag Context version 0
121127

122-
#### Tag
128+
##### Tag
123129

130+
* repeated
124131
* `field_id` = 0
125132
* `field_format` = `<tag_key_len><tag_key><tag_val_len><tag_val>` where
126133

0 commit comments

Comments
 (0)