@@ -82,10 +82,10 @@ YAML section: `ebpf`
8282You can configure the component under the `ebpf` section of your YAML
8383configuration or via environment variables.
8484
85- | YAML<br>environment variable | Description | Type | Default |
86- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -------- |
87- | `context_propagation`<br>`OTEL_EBPF_BPF_CONTEXT_PROPAGATION` | Controls trace context propagation method. Accepted : ` all` , `headers`, `ip `, `disabled`. For more information, refer to the [context propagation section](#context-propagation). | string | disabled |
88- | `track_request_headers`<br>`OTEL_EBPF_BPF_TRACK_REQUEST_HEADERS` | Track incoming `Traceparent` headers for trace spans. For more information, refer to the [track request headers section](#track-request-headers). | boolean | false |
85+ | YAML<br>environment variable | Description | Type | Default |
86+ | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- | -------- |
87+ | `context_propagation`<br>`OTEL_EBPF_BPF_CONTEXT_PROPAGATION` | Controls trace context propagation method. Accepted : ` all` , `headers`, `tcp`, `headers,tcp `, `disabled`. For more information, refer to the [context propagation section](#context-propagation). | string | disabled |
88+ | `track_request_headers`<br>`OTEL_EBPF_BPF_TRACK_REQUEST_HEADERS` | Track incoming `Traceparent` headers for trace spans. For more information, refer to the [track request headers section](#track-request-headers). | boolean | false |
8989
9090# ## Context propagation
9191
@@ -102,17 +102,21 @@ that also use TC must chain correctly with OBI. For more information about
102102chaining programs, see the
103103[Cilium compatibility documentation](../../cilium-compatibility/).
104104
105- You can disable the TCP/IP level encoding and TC programs by setting
106- ` context_propagation="headers"` . This context propagation is fully compatible
107- with any OpenTelemetry distributed tracing library.
105+ You can disable the TCP- level propagation and Linux Traffic Control programs by
106+ setting `context_propagation="headers"`. This mode is fully compatible with any
107+ OpenTelemetry distributed tracing library.
108108
109109Context propagation values :
110110
111- - `all` : Enable both HTTP and IP options context propagation
111+ - `all` : Enable both HTTP header and TCP context propagation
112112- `headers` : Enable context propagation via the HTTP headers only
113- - `ip` : Enable context propagation via the IP options field only
113+ - `tcp` : Enable context propagation via the TCP packet path only
114+ - `headers,tcp` : Enable both methods explicitly
114115- `disabled` : Disable trace context propagation
115116
117+ ` http` is accepted as an alias for `headers`, but `headers` is the preferred
118+ name in examples and configuration.
119+
116120To use this option in containerized environments (Kubernetes and Docker), you
117121must :
118122
@@ -121,7 +125,7 @@ must:
121125 path
122126- Grant the `CAP_NET_ADMIN` capability to the OBI container
123127
124- gRPC and HTTP/2 are not supported.
128+ gRPC and HTTP/2 are not supported for this network-level mode .
125129
126130For an example of how to configure distributed traces in Kubernetes, see our
127131[Distributed traces with OBI](../../distributed-traces/) guide.
@@ -154,22 +158,24 @@ because it can create false positives, for example, if an application sends SQL
154158text for logging through a TCP connection. Currently, OBI natively supports the
155159PostgreSQL and MySQL binary protocols.
156160
157- # ## HTTP header enrichment for spans
161+ # ## HTTP header and body enrichment for spans {#http-header-enrichment-for-spans}
162+
163+ # ## HTTP header and body enrichment for spans
158164
159- OBI can attach selected HTTP headers to spans through the
160- ` ebpf.payload_extraction.http.enrichment` configuration section. This is useful
161- when you want to carry business or routing headers into traces without manually
162- instrumenting the application.
165+ OBI can attach selected HTTP headers and selected HTTP body fields to spans
166+ through the `ebpf.payload_extraction.http.enrichment` configuration section.
167+ This is useful when you want to carry business or routing headers into traces
168+ without manually instrumenting the application.
163169
164170The enrichment engine is rule-based :
165171
166- - Set `enabled : true` to activate HTTP header enrichment.
167- - Use `policy.default_action` to define whether unmatched headers are included
168- or excluded. The default is `exclude` .
169- - Use `policy.match_order` to control rule evaluation. The default is
170- ` first_match_wins ` .
171- - Use `obfuscate` rules to redact sensitive values while still exposing the
172- header key on the span .
172+ - Set `enabled : true` to activate HTTP header and body enrichment.
173+ - Use `policy.default_action.headers` and `policy.default_action.body` in YAML
174+ to define whether unmatched headers or body content are included or excluded .
175+ The default for both is `exclude`.
176+ - Use `obfuscate` rules to redact sensitive header values or JSON body fields
177+ before they are attached to spans.
178+ - Rules are evaluated in order .
173179
174180For example :
175181
@@ -182,8 +188,9 @@ ebpf:
182188 enrichment:
183189 enabled: true
184190 policy:
185- default_action: exclude
186- match_order: first_match_wins
191+ default_action:
192+ headers: exclude
193+ body: exclude
187194 obfuscation_string: '***'
188195 rules:
189196 - action: obfuscate
@@ -202,17 +209,40 @@ ebpf:
202209 - X-Custom-*
203210 - X-Dice-Roll
204211 case_sensitive: false
212+ - action: include
213+ type: body
214+ scope: request
215+ match:
216+ methods: [POST]
217+ url_path_patterns:
218+ - /v1/chat/completions
219+ - action: obfuscate
220+ type: body
221+ scope: request
222+ match:
223+ methods: [POST]
224+ url_path_patterns:
225+ - /v1/chat/completions
226+ obfuscation_json_paths:
227+ - $.messages[*].content
205228` ` `
206229
207- The following environment variables control the policy defaults :
230+ The following environment variables control the global enrichment behavior :
208231
209232- ` OTEL_EBPF_HTTP_ENRICHMENT_ENABLED`
210- - ` OTEL_EBPF_HTTP_ENRICHMENT_DEFAULT_ACTION`
211- - ` OTEL_EBPF_HTTP_ENRICHMENT_MATCH_ORDER`
212233- ` OTEL_EBPF_HTTP_ENRICHMENT_OBFUSCATION_STRING`
213234
214- Rules themselves are configured in YAML. If you expect large headers, increase
215- ` ebpf.buffer_sizes.http` so OBI can capture the relevant values.
235+ The `policy.default_action.headers` and `policy.default_action.body` settings
236+ are configured in YAML only; there are no environment variables for these
237+ defaults.
238+
239+ Rules themselves are configured in YAML. Header rules use `match.patterns` and
240+ optional `case_sensitive`. Body rules use `match.url_path_patterns`,
241+ ` match.methods` , and `match.obfuscation_json_paths`.
242+
243+ Body extraction requires HTTP payload capture. Increase `ebpf.buffer_sizes.http`
244+ so OBI can capture the request or response bytes you want to enrich. The limit
245+ applies independently to requests and responses.
216246
217247# # Instance ID decoration
218248
0 commit comments