@@ -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,22 @@ 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
158162
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.
163+ OBI can attach selected HTTP headers and selected HTTP body fields to spans
164+ through the `ebpf.payload_extraction.http.enrichment` configuration section.
165+ This is useful when you want to carry business or routing headers into traces
166+ without manually instrumenting the application.
163167
164168The enrichment engine is rule-based :
165169
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 .
170+ - Set `enabled : true` to activate HTTP header and body enrichment.
171+ - Use `policy.default_action.headers` and `policy.default_action.body` to define
172+ whether unmatched headers or body content are included or excluded. The
173+ default for both is `exclude`.
174+ - Use `obfuscate` rules to redact sensitive header values or JSON body fields
175+ before they are attached to spans.
176+ - Rules are evaluated in order .
173177
174178For example :
175179
@@ -182,8 +186,9 @@ ebpf:
182186 enrichment:
183187 enabled: true
184188 policy:
185- default_action: exclude
186- match_order: first_match_wins
189+ default_action:
190+ headers: exclude
191+ body: exclude
187192 obfuscation_string: '***'
188193 rules:
189194 - action: obfuscate
@@ -202,17 +207,36 @@ ebpf:
202207 - X-Custom-*
203208 - X-Dice-Roll
204209 case_sensitive: false
210+ - action: include
211+ type: body
212+ scope: request
213+ match:
214+ methods: [POST]
215+ url_path_patterns:
216+ - /v1/chat/completions
217+ - action: obfuscate
218+ type: body
219+ scope: request
220+ match:
221+ methods: [POST]
222+ url_path_patterns:
223+ - /v1/chat/completions
224+ obfuscation_json_paths:
225+ - $.messages[*].content
205226` ` `
206227
207- The following environment variables control the policy defaults :
228+ The following environment variables control the global enrichment behavior :
208229
209230- ` OTEL_EBPF_HTTP_ENRICHMENT_ENABLED`
210- - ` OTEL_EBPF_HTTP_ENRICHMENT_DEFAULT_ACTION`
211- - ` OTEL_EBPF_HTTP_ENRICHMENT_MATCH_ORDER`
212231- ` OTEL_EBPF_HTTP_ENRICHMENT_OBFUSCATION_STRING`
213232
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.
233+ Rules themselves are configured in YAML. Header rules use `match.patterns` and
234+ optional `case_sensitive`. Body rules use `match.url_path_patterns`,
235+ ` match.methods` , and `match.obfuscation_json_paths`.
236+
237+ Body extraction requires HTTP payload capture. Increase `ebpf.buffer_sizes.http`
238+ so OBI can capture the request or response bytes you want to enrich. The limit
239+ applies independently to requests and responses.
216240
217241# # Instance ID decoration
218242
0 commit comments