You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/10-overview.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,10 +18,10 @@ This transformation of modern applications calls for a distributed tracing conte
18
18
The trace context specification defines a universally agreed-upon format for the exchange of trace context propagation data - referred to as *trace context*. Trace context solves the problems described above by
19
19
20
20
- providing an unique identifier for individual traces and requests, allowing trace data of multiple providers to be linked together.
21
-
- providing an agreed-upon mechanism to forward vendor-specific trace data and avoid broken traces when multiple trace tools participate in a single transaction.
21
+
- providing an agreed-upon mechanism to forward vendor-specific trace data and avoid broken traces when multiple tracing tools participate in a single transaction.
22
22
- providing an industry standard that intermediaries, platforms, and hardware providers can support.
23
23
24
-
A unified approach for propagating trace data improves visibility into the behavior of distributed applications, facilitating problem and performance analysis. The interoperability provided by trace-context is a prerequisite to manage modern micro-service based applications.
24
+
A unified approach for propagating trace data improves visibility into the behavior of distributed applications, facilitating problem and performance analysis. The interoperability provided by tracecontext is a prerequisite to manage modern micro-service based applications.
25
25
26
26
## Design Overview
27
27
@@ -32,7 +32,7 @@ Trace context is split into two individual propagation fields supporting interop
32
32
33
33
Tracing tools can provide two levels of compliant behavior interacting with trace context:
34
34
35
-
- At a minimum they MUST propagate the `traceparent` and `tracestate` headers and guarantee traces are not broken. this behavior is also referred to as forwarding a trace.
35
+
- At a minimum they MUST propagate the `traceparent` and `tracestate` headers and guarantee traces are not broken. This behavior is also referred to as forwarding a trace.
36
36
- In addition they CAN also choose to participate in a trace by modifying the `traceparent` header and relevant parts of the `tracestate` header containing their proprietary information. This is also referred to as participating in a trace.
37
37
38
38
A tracing tool can choose to change this behavior for each individual request to a component it is monitoring.
You'll notice that the Rojo system reuses the value of it’s`traceparent` for its entry in `tracestate`. This means it is a generic tracing system (no proprietary information is being passed). Otherwise, `tracestate` entries are opaque and can be vendor-specific.
35
+
You'll notice that the Rojo system reuses the value of its`traceparent` for its entry in `tracestate`. This means it is a generic tracing system (no proprietary information is being passed). Otherwise, `tracestate` entries are opaque and can be vendor-specific.
36
36
37
37
If the next receiving server uses Congo, it carries over the `tracestate` from Rojo and adds a new entry for the parent to the left of the previous entry.
38
38
@@ -68,7 +68,7 @@ Vendors MUST expect the header name in any case (upper, lower, mixed), and SHOUL
68
68
69
69
### traceparent Header Field Values
70
70
71
-
This section uses the Augmented Backus-Naur Form (ABNF) notation of [[RFC5234](https://w3c.github.io/trace-context/#bib-rfc5234)], including the DIGIT rule from that document. `DIGIT` rule defines a single number character `0`-`9`.
71
+
This section uses the Augmented Backus-Naur Form (ABNF) notation of [[RFC5234](https://w3c.github.io/trace-context/#bib-rfc5234)], including the DIGIT rule from that document. The `DIGIT` rule defines a single number character `0`-`9`.
72
72
73
73
```abnf
74
74
HEXDIGLC = DIGIT / "a" / "b" / "c" / "d" / "e" / "f" ; lowercase hex character
@@ -85,7 +85,7 @@ version = 2HEXDIGLC ; this document assumes version 00. Version 255 is
85
85
86
86
The value is US-ASCII encoded (which is UTF-8 compliant).
87
87
88
-
Version (`version`) is a 1 byte representing an 8-bit unsigned integer. Version `255` is invalid. The current specification assumes the `version` is set to `00`.
88
+
Version (`version`) is 1 byte representing an 8-bit unsigned integer. Version `255` is invalid. The current specification assumes the `version` is set to `00`.
89
89
90
90
#### version-format
91
91
@@ -103,10 +103,10 @@ trace-flags = 2HEXDIGLC ; 8 bit flags. Currently, only one bit is used. S
103
103
This is the ID of the whole trace forest and is used to uniquely identify a [distributed trace](https://w3c.github.io/trace-context/#dfn-distributed-traces) through a system. It is represented as a 16-byte array, for example, `4bf92f3577b34da6a3ce929d0e0e4736`. All bytes as zero (`00000000000000000000000000000000`) is considered an invalid value.
104
104
105
105
106
-
A vendor SHOULD generate globally unique values for `trace-id`. Many unique identification generation algorithms create IDs where one part of the value is constant (often time- or host-based), and the other part is a randomly generated value. Because tracing systems may make sampling decisions based on the value of `trace-id`, for increased interoperability vendors MUST keep the random part of `trace-id` ID on the left side.
106
+
A vendor SHOULD generate globally unique values for `trace-id`. Many unique identification generation algorithms create IDs where one part of the value is constant (often time- or host-based), and the other part is a randomly generated value. Because tracing systems may make sampling decisions based on the value of `trace-id`, for increased interoperability vendors MUST keep the random part of `trace-id` ID on the left side.
107
107
108
108
109
-
When a system operates with a `trace-id` that is shorter than 16 bytes, it SHOULD fill-in the extra bytes with random values rather than zeroes. Let's say the system works with an 8-byte `trace-id` like `3ce929d0e0e4736`. Instead of setting `trace-id` value to `0000000000000003ce929d0e0e4736` it SHOULD generate a value like `4bf92f3577b34da6a3ce929d0e0e4736` where`4bf92f3577b34da6a` is a random value or a function of time and host value.
109
+
When a system operates with a `trace-id` that is shorter than 16 bytes, it SHOULD fill-in the extra bytes with random values rather than zeroes. Let's say the system works with an 8-byte `trace-id` like `3ce929d0e0e4736`. Instead of setting `trace-id` value to `0000000000000003ce929d0e0e4736` it SHOULD generate a value like `4bf92f3577b34da6a3ce929d0e0e4736` where`4bf92f3577b34da6a` is a random value or a function of time and host value.
110
110
111
111
112
112
**Note**: Even though a system may operate with a shorter `trace-id` for [distributed trace](https://w3c.github.io/trace-context/#dfn-distributed-traces) reporting, the full `trace-id` MUST be propagated to conform to the specification.
@@ -157,7 +157,7 @@ Various techniques include:
157
157
158
158
- Probability sampling (sample 1 out of 100 <a>distributed traces</a> by flipping a coin)
159
159
- Delayed decision (make collection decision based on duration or a result of a request)
160
-
- Deferred sampling (let callee decide whether information about this request need to be collected)
160
+
- Deferred sampling (let the callee decide whether information about this request needs to be collected)
161
161
162
162
How these techniques are implemented can be tracing vendor-specific or application-defined.
163
163
@@ -207,12 +207,12 @@ base16(trace-flags) = 00 // not sampled
207
207
208
208
### Versioning of traceparent
209
209
210
-
This specification is opinionated about future version of the trace context. The current version of this specification assumes that future versions of `traceparent` header will be additive to the current one.
210
+
This specification is opinionated about future versions of trace context. The current version of this specification assumes that future versions of the`traceparent` header will be additive to the current one.
211
211
212
212
Vendors MUST follow these rules when parsing headers with an unexpected format:
213
213
214
214
- Pass-through services should not analyze the version. They should expect that headers may have larger size limits in the future and only disallow prohibitively large headers.
215
-
- When the version prefix cannot be parsed (it's not 2 hex characters followed by a dash (`-`), the implementation should restart the trace.
215
+
- When the version prefix cannot be parsed (it's not 2 hex characters followed by a dash (`-`)), the implementation should restart the trace.
216
216
- If a higher version is detected, the implementation SHOULD try to parse it by trying the following:
217
217
- If the size of the header is shorter than 55 characters, the vendor should not parse the header and should restart the trace.
218
218
- Parse `trace-id` (from the first dash through the next 32 characters). Vendors MUST check that the 32 characters are hex, and that they are followed by a dash (`-`).
@@ -244,15 +244,15 @@ The `tracestate` field may contain any opaque value in any of the keys. Multiple
244
244
245
245
This section uses the Augmented Backus-Naur Form (ABNF) notation of [[RFC5234](https://w3c.github.io/trace-context/#bib-rfc5234)], including the DIGIT rule in [appendix B.1 for RFC5234](https://tools.ietf.org/html/rfc5234#appendix-B.1). It also includes the `OWS` rule from [RFC7230 section 3.2.3](https://httpwg.org/specs/rfc7230.html#section-3.2.3).
246
246
247
-
`DIGIT` rule defines number`0`-`9`.
247
+
The `DIGIT` rule defines numbers`0`-`9`.
248
248
249
249
The `OWS` rule defines an optional whitespace character. To improve readability, it is used where zero or more whitespace characters might appear.
250
250
251
251
The caller SHOULD generate the optional whitespace as a single space; otherwise, a caller SHOULD NOT generate optional whitespace. See details in the [corresponding RFC](https://httpwg.org/specs/rfc7230.html#section-3.2.3).
252
252
253
253
The `tracestate` field value is a `list` of `list-members` separated by commas (`,`). A `list-member` is a key/value pair separated by an equals sign (`=`). Spaces and horizontal tabs surrounding `list-member`s are ignored. There can be a maximum of 32 `list-member`s in a `list`.
254
254
255
-
Empty and whitespace-only list members are allowed. Vendors MUST accept empty `tracestate`headers but SHOULD avoid sending them. Empty list members are allowed in `tracestate` because it is difficult for a vendor to recognize the empty value when multiple `tracestate` headers are sent. Whitespace characters are allowed for a similar reason, as some vendors automatically inject whitespace after a comma separator, even in the case of an empty header.
255
+
Empty and whitespace-only list members are allowed. Vendors MUST accept empty `tracestate`headers but SHOULD avoid sending them. Empty list members are allowed in `tracestate` because it is difficult for a vendor to recognize the empty value when multiple `tracestate` headers are sent. Whitespace characters are allowed for a similar reason, as some vendors automatically inject whitespace after a comma separator, even in the case of an empty header.
256
256
257
257
#### list
258
258
@@ -269,7 +269,7 @@ Identifiers for a `list` are short (up to 256 characters) textual identifiers.
269
269
270
270
#### list-members
271
271
272
-
A`list-member` contains a key/value pair.
272
+
A`list-member` contains a key/value pair.
273
273
274
274
##### Key
275
275
@@ -288,7 +288,7 @@ For multi-tenant vendors scenarios, an at sign (`@`) sign can be used to prefix
288
288
289
289
##### Value
290
290
291
-
The value is opaque string up to 256 characters printable ASCII [[RFC0020](https://w3c.github.io/trace-context/#bib-rfc0020)] characters (i.e., the range 0x20 to 0x7E) except comma (`,`) and (`=`). Note that this also excludes tabs, newlines, carriage returns, etc.
291
+
The value is an opaque string up to 256 characters printable ASCII [[RFC0020](https://w3c.github.io/trace-context/#bib-rfc0020)] characters (i.e., the range 0x20 to 0x7E) except comma (`,`) and (`=`). Note that this also excludes tabs, newlines, carriage returns, etc.
292
292
293
293
```abnf
294
294
value = 0*255(chr) nblk-chr
@@ -344,7 +344,7 @@ The version of `tracestate` is defined by the version prefix of `traceparent` he
344
344
345
345
A vendor receiving a `traceparent` request header MUST send it to outgoing requests. It MAY mutate the value of this header before passing it to outgoing requests.
346
346
347
-
If the value of the `traceparent` field wasn't changed before propagation, `tracestate` MUST NOT be modified as well. Unmodified headers propagation is typically implemented in pass-through services like proxies. This behavior may also be implemented in a service which currently does not collect distributed tracing information.
347
+
If the value of the `traceparent` field wasn't changed before propagation, `tracestate` MUST NOT be modified as well. Unmodified header propagation is typically implemented in pass-through services like proxies. This behavior may also be implemented in a service which currently does not collect distributed tracing information.
348
348
349
349
Following is the list of allowed mutations:
350
350
@@ -363,4 +363,4 @@ Following are allowed mutations:
363
363
364
364
-**Update key value**. The value of any key can be updated. Modified keys MUST be moved to the beginning (left) of the list. This is the most common mutation resuming the trace.
365
365
-**Add a new key/value pair**. The new key-value pair SHOULD be added to the beginning of the list.
366
-
-**Delete a key/value pair**. Any key/value pair MAY be deleted. Vendors SHOULD NOT delete keys that were not generated by them. The deletion of an unknown key/value pair will break correlation in other systems. This mutation enables two scenarios. The first is that proxies can block certain `tracestate` keys for privacy and security concerns. The second scenario is a truncation of long `tracestate`'s.
366
+
-**Delete a key/value pair**. Any key/value pair MAY be deleted. Vendors SHOULD NOT delete keys that were not generated by them. The deletion of an unknown key/value pair will break correlation in other systems. This mutation enables two scenarios. The first is that proxies can block certain `tracestate` keys for privacy and security concerns. The second scenario is a truncation of long `tracestate`s.
Copy file name to clipboardExpand all lines: spec/21-http_header_format_rationale.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,7 +114,7 @@ Url encoding is low-overhead way to encode unicode characters for non-latin char
114
114
115
115
## Vendor name in a key
116
116
117
-
Sign `@` is allowed in a key for easy parsing of vendor name out of the tracestate key. The idea is that with the registry of trace vendors one can easily understand the vendor name and how to parse it's trace state. Without `@` sign parsing will be more complicated. Also `@` sign has known semantics in addressing for protocols like ftp and e-mails.
117
+
Sign `@` is allowed in a key for easy parsing of vendor name out of the tracestate key. The idea is that with the registry of tracing vendors one can easily understand the vendor name and how to parse it's trace state. Without `@` sign parsing will be more complicated. Also `@` sign has known semantics in addressing for protocols like ftp and e-mails.
Copy file name to clipboardExpand all lines: spec/30-processing-model.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ If a `traceparent` header is received:
25
25
* If the _version cannot be parsed_, the vendor creates a new `traceparent` header and deletes `tracestate`.
26
26
* If the _version number is higher_ than supported by the tracer, the vendor uses the format defined in this specification (`00`) to parse `trace-id` and `parent-id`.
27
27
The vendor will only parse the `trace-flags` values supported by this version of this specification and ignore all other values. If parsing fails, the vendor creates a new `traceparent` header and deletes the `tracestate`.
28
-
* If the vendor _supports the version number_, it validates `trace-id` and `parent-id`. If either `trace-id`, `parent-id` or `trace-flags` are invalid, the vendor creates a new `traceparent`header and deletes `tracestate`.
28
+
* If the vendor _supports the version number_, it validates `trace-id` and `parent-id`. If either `trace-id`, `parent-id` or `trace-flags` are invalid, the vendor creates a new `traceparent`header and deletes `tracestate`.
29
29
3. The vendor MAY validate the `tracestate` header. If the `tracestate` header cannot be parsed the vendor MAY discard the entire header. Invalid `tracestate` entries MAY also be discarded.
30
30
4. For each outgoing request the vendor performs the following steps:
31
31
- The vendor MUST modify the `traceparent` header:
@@ -41,4 +41,4 @@ The vendor will only parse the `trace-flags` values supported by this version of
41
41
42
42
## Alternative Processing
43
43
44
-
The processing model above describes the complete set of steps for processing trace context headers. There are, however, situations when a vendor might only support a subset of the steps described above. Proxies or messaging middleware MAY decide to not modify the `traceparent` headers but remove invalid headers or add additional information to `tracestate`.
44
+
The processing model above describes the complete set of steps for processing trace context headers. There are, however, situations when a vendor might only support a subset of the steps described above. Proxies or messaging middleware MAY decide not to modify the `traceparent` headers but remove invalid headers or add additional information to `tracestate`.
Copy file name to clipboardExpand all lines: spec/50-privacy.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Privacy Considerations
2
2
3
-
Requirements to propagate headers to downstream services, as well as storing values of these headers, open up potential privacy concerns. Trace vendors MUST NOT use `traceparent` and `tracestate` fields for any personally identifiable or otherwise sensitive information. The only purpose of these fields is to enable trace correlation.
3
+
Requirements to propagate headers to downstream services, as well as storing values of these headers, open up potential privacy concerns. Tracing vendors MUST NOT use `traceparent` and `tracestate` fields for any personally identifiable or otherwise sensitive information. The only purpose of these fields is to enable trace correlation.
4
4
5
5
Vendors MUST assess the risk of header abuse. This section provides some considerations and initial assessment of the risk associated with storing and propagating these headers. Tracing vendors may choose to inspect and remove sensitive information from the fields before allowing the tracing system to execute code that can potentially propagate or store these fields. All mutations should, however, conform to the list of mutations defined in this specification.
0 commit comments