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: daprdocs/content/en/operations/observability/tracing/tracing-overview.md
+132Lines changed: 132 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,138 @@ If you decide to generate trace headers yourself, there are three ways this can
111
111
112
112
Read [the trace context overview]({{% ref w3c-tracing-overview %}}) for more background and examples on W3C trace context and headers.
113
113
114
+
### Baggage Support
115
+
116
+
Dapr supports two distinct mechanisms for propagating W3C Baggage alongside trace context:
117
+
118
+
1.**Context Baggage (OpenTelemetry)**
119
+
- Follows OpenTelemetry conventions with decoded values
120
+
- Used when working with OpenTelemetry context propagation
121
+
- Values are stored and transmitted in their original, unencoded form
122
+
- Recommended for OpenTelemetry integrations and when working with application context
123
+
124
+
2.**Header/Metadata Baggage**
125
+
- You must URL encode special characters (for example, `%20` for spaces, `%2F` for slashes) when setting header/metadata baggage
126
+
- Values remain percent-encoded in transport as required by the W3C Baggage spec
127
+
- Values stay encoded when inspecting raw headers/metadata
128
+
- Only OpenTelemetry APIs will decode the values
129
+
- Example: Use `serverNode=DF%2028` (not `serverNode=DF 28`) when setting header baggage
130
+
131
+
For security purposes, context baggage and header baggage are strictly separated and never merged between domains. This ensures that baggage values maintain their intended format and security properties.
132
+
133
+
#### Using Baggage with Dapr
134
+
135
+
You can propagate baggage using either mechanism, depending on your use case.
136
+
137
+
1.**In your application code**: Set the baggage in the context before making a Dapr API call
138
+
2.**When calling Dapr**: Pass the context to any Dapr API call
139
+
3.**Inside Dapr**: The Dapr runtime automatically picks up the baggage
140
+
4.**Propagation**: Dapr automatically propagates the baggage to downstream services, maintaining the appropriate encoding for each mechanism
For security purposes, context baggage and header baggage are strictly separated and never merged between domains. This ensures that baggage values maintain their intended format and security properties in each domain.
103
+
104
+
Multiple baggage headers are supported and will be combined according to the W3C specification. Dapr automatically propagates baggage across service calls while maintaining the appropriate encoding for each domain.
77
105
106
+
{{% /tab %}}
78
107
79
-
<!-- gRPC -->
80
108
{{% tab "gRPC" %}}
81
109
82
110
In the gRPC API calls, trace context is passed through `grpc-trace-bin` header.
83
111
112
+
**Baggage Support**
113
+
114
+
Dapr supports [W3C Baggage](https://www.w3.org/TR/baggage/) for propagating key-value pairs alongside trace context through two distinct mechanisms:
115
+
116
+
1. **Context Baggage (OpenTelemetry)**
117
+
- Follows OpenTelemetry conventions with decoded values
118
+
- Used when propagating baggage through gRPC context
119
+
- Values are stored in their original, unencoded form
120
+
- Example of how it would be printed with OpenTelemetry APIs:
For security purposes, context baggage and metadata baggage are strictly separated and never merged between domains. This ensures that baggage values maintain their intended format and security properties in each domain.
134
+
135
+
Multiple baggage metadata entries are supported and will be combined according to the W3C specification. Dapr automatically propagates baggage across service calls while maintaining the appropriate encoding for each domain.
0 commit comments