Skip to content

Commit

Permalink
Results from /fix:format
Browse files Browse the repository at this point in the history
  • Loading branch information
opentelemetrybot committed Jun 26, 2024
1 parent 105c0c8 commit 79f4bc4
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions content/en/docs/concepts/signals/baggage.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ description: Contextual information that is passed between signals.
---

In OpenTelemetry, Baggage is contextual information that resides next to
context. Baggage is a key-value store, which means it lets you [propagate](/docs/concepts/context-propagation/#propagation) any
data you like alongside [context](/docs/concepts/context-propagation/#context).
context. Baggage is a key-value store, which means it lets you
[propagate](/docs/concepts/context-propagation/#propagation) any data you like
alongside [context](/docs/concepts/context-propagation/#context).

Baggage means you can pass data across services and processes, making it
available to add to [traces](/docs/concepts/signals/traces/), [metrics](/docs/concepts/signals/metrics/), or [logs](/docs/concepts/signals/logs/) in those services.
available to add to [traces](/docs/concepts/signals/traces/),
[metrics](/docs/concepts/signals/metrics/), or
[logs](/docs/concepts/signals/logs/) in those services.

## Example

Expand All @@ -35,10 +38,10 @@ Baggage is best used to include information typically available only at the
start of a request further downstream. This can include things like Account
Identification, User IDs, Product IDs, and origin IPs, for example.

Propagating this information using baggage allows for deeper analysis of telemetry
in a backend. For example, if you include information like a User ID on a span
that tracks a database call, you can much more easily answer questions like
"which users are experiencing the slowest database calls?" You can also log
Propagating this information using baggage allows for deeper analysis of
telemetry in a backend. For example, if you include information like a User ID
on a span that tracks a database call, you can much more easily answer questions
like "which users are experiencing the slowest database calls?" You can also log
information about a downstream operation and include that same User ID in the
log data.

Expand All @@ -60,15 +63,16 @@ yours, so exercise caution when reading them.
## Baggage is not the same as attributes

An important thing to note about baggage is that it is a separate key-value
store and is unassociated with attributes on spans, metrics, or logs without explicitly adding them.
store and is unassociated with attributes on spans, metrics, or logs without
explicitly adding them.

To add baggage entries to attributes, you need to explicitly read the data
from baggage and add it as attributes to your spans, metrics, or logs.
To add baggage entries to attributes, you need to explicitly read the data from
baggage and add it as attributes to your spans, metrics, or logs.

Because a common use cases for Baggage is to add data to
[Span Attributes](/docs/concepts/signals/traces/#attributes) across a whole
trace, several languages have Baggage Span Processors that add data from
baggage as attributes on span creation.
trace, several languages have Baggage Span Processors that add data from baggage
as attributes on span creation.

> For more information, see the [baggage specification][].
Expand Down

0 comments on commit 79f4bc4

Please sign in to comment.