Skip to content

Commit 0127b1f

Browse files
authored
Align definition of Baggage with W3C Baggage Specification (#3800)
1 parent 24740fd commit 0127b1f

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ release.
77

88
## Unreleased
99

10-
### Context
10+
### Context & Baggage
11+
12+
- Align definition of Baggage with W3C Specification.
13+
([#3800](https://github.com/open-telemetry/opentelemetry-specification/pull/3800))
1114

1215
### Traces
1316

specification/baggage/api.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,20 @@
2424

2525
## Overview
2626

27-
`Baggage` is used to annotate telemetry, adding context and information to
28-
metrics, traces, and logs. It is a set of name/value pairs describing
29-
user-defined properties. Each name in `Baggage` MUST be associated with
30-
exactly one value.
27+
`Baggage` is a set of application-defined properties contextually associated
28+
with a distributed request or workflow execution (see also the [W3C Baggage
29+
Specification][w3c]). Baggage can be used, among other things, to annotate
30+
telemetry, adding contextual information to metrics, traces, and logs.
31+
32+
In OpenTelemetry `Baggage` is represented as a set of name/value pairs
33+
describing user-defined properties. Each name in `Baggage` MUST be associated
34+
with _exactly one value_. This is more restrictive than the [W3C Baggage
35+
Specification, § 3.2.1.1](https://www.w3.org/TR/baggage/#baggage-string)
36+
which allows duplicate entries for a given name.
3137

3238
The Baggage API consists of:
3339

34-
- the `Baggage`
40+
- the `Baggage` as a logical container
3541
- functions to interact with the `Baggage` in a `Context`
3642

3743
The functions described here are one way to approach interacting with the
@@ -146,7 +152,7 @@ reasons.
146152

147153
The API layer or an extension package MUST include the following `Propagator`s:
148154

149-
* A `TextMapPropagator` implementing the [W3C Baggage Specification](https://www.w3.org/TR/baggage).
155+
* A `TextMapPropagator` implementing the [W3C Baggage Specification][w3c].
150156

151157
See [Propagators Distribution](../context/api-propagators.md#propagators-distribution)
152158
for how propagators are to be distributed.
@@ -165,3 +171,5 @@ additional requirements these operations need to follow.
165171
If a new name/value pair is added and its name is the same as an existing name,
166172
than the new pair MUST take precedence. The value is replaced with the added
167173
value (regardless if it is locally generated or received from a remote peer).
174+
175+
[w3c]: https://www.w3.org/TR/baggage

0 commit comments

Comments
 (0)