Skip to content

Commit 17418b2

Browse files
MrAliasNimrodAvni78otelbot[bot]tiffany76theletterf
authored
Blog post: OBI Header Enrichment (#9587)
Co-authored-by: Nimrod Avni <NimrodAvni78@users.noreply.github.com> Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com> Co-authored-by: Tiffany Hrabusa <30397949+tiffany76@users.noreply.github.com> Co-authored-by: Fabrizio Ferri-Benedetti <algernon@fastmail.com>
1 parent 43ead38 commit 17418b2

File tree

6 files changed

+128
-0
lines changed

6 files changed

+128
-0
lines changed
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
title: OBI Gives Incident Response the Request Context It Needs
3+
linkTitle: OBI Incident Response Context
4+
date: 2026-04-10
5+
author: >-
6+
[Tyler Yahn](https://github.com/MrAlias) (Splunk), [Nimrod
7+
Avni](https://github.com/NimrodAvni78) (Coralogix)
8+
sig: SIG eBPF Instrumentation
9+
cSpell:ignore: Avni obfuscate x-tenant-id x-user-segment Yahn
10+
---
11+
12+
When incidents are active, traces usually tell you that something is wrong. The
13+
harder problem is figuring out who is affected and why, quickly.
14+
15+
[OpenTelemetry eBPF Instrumentation (OBI)](https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation)
16+
[v0.7.0](https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/releases/tag/v0.7.0)
17+
adds HTTP header enrichment so spans can carry request context like tenant or
18+
user segment. That context is often exactly what helps you move from "error rate
19+
is up" to "this is isolated to one customer cohort".
20+
21+
The best part: this is a config change on OBI itself. You do not need to rebuild
22+
or redeploy your existing applications.
23+
24+
## Why this matters in practice
25+
26+
Most teams have felt this pain: traces show latency and failures, but not enough
27+
request context to narrow scope during triage. Header enrichment closes that gap
28+
without requiring app code changes.
29+
30+
For this demo, we include:
31+
32+
- `x-tenant-id`
33+
- `x-user-segment`
34+
35+
And we intentionally obfuscate:
36+
37+
- `authorization`
38+
39+
That gives responders useful debugging context while still masking sensitive
40+
values.
41+
42+
## The config change
43+
44+
This is the core policy used in the demo:
45+
46+
```yaml
47+
ebpf:
48+
# Needed so headers are captured for enrichment.
49+
track_request_headers: true
50+
payload_extraction:
51+
http:
52+
enrichment:
53+
enabled: true
54+
policy:
55+
# Only emit headers that rules explicitly match.
56+
default_action: exclude
57+
# Replacement value for obfuscated headers.
58+
obfuscation_string: '***'
59+
rules:
60+
- action: include
61+
type: headers
62+
scope: all
63+
match:
64+
patterns: ['x-tenant-id', 'x-user-segment']
65+
case_sensitive: false
66+
- action: obfuscate
67+
type: headers
68+
scope: all
69+
match:
70+
patterns: ['authorization']
71+
case_sensitive: false
72+
```
73+
74+
Two small details are worth calling out: `scope: all` applies rules to both
75+
request and response headers, and `case_sensitive: false` avoids missing headers
76+
because of casing differences.
77+
78+
Turning this feature on or off is a simple OBI config update and OBI redeploy.
79+
No application rebuild required.
80+
81+
## Visual walkthrough
82+
83+
Baseline trace (before enrichment): no header attributes in the span.
84+
85+
![Jaeger baseline trace with no enriched headers](v0-6-0-baseline.png)
86+
87+
After enabling enrichment in OBI v0.7.0: the span now includes request header
88+
context.
89+
90+
![Jaeger trace with enriched request header attributes](v0-7-0-header-enrichment.png)
91+
92+
Note, now `authorization` is present but masked, while `x-tenant-id` and
93+
`x-user-segment` stay visible.
94+
95+
![Jaeger span tags showing obfuscated authorization and included tenant and segment headers](v0-7-0-obfuscated-closeup.png)
96+
97+
Traces can now be filtered by enriched attributes (for example
98+
`http.request.header.x-tenant-id`) to focus on the impacted cohort.
99+
100+
![Jaeger trace search filtered by enriched header attribute for tenant triage](v0-7-0-triage.png)
101+
102+
## Takeaway
103+
104+
OBI
105+
[v0.7.0](https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/releases/tag/v0.7.0)
106+
header enrichment is a practical debugging feature: it improves incident
107+
response signal, keeps policy explicit, and can be rolled out (or rolled back)
108+
by changing OBI configuration only.
109+
110+
Already running OBI? Upgrade to v0.7.0 and give
111+
[header enrichment](/docs/zero-code/obi/configure/metrics-traces-attributes/#http-header-enrichment-for-spans)
112+
a try.
113+
114+
New to OBI? Start with the
115+
[demo used in this post](https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/tree/b1f159092a3743464e53e78b16f0c4d817c47e02/examples/http-header-enrichment-demo)
116+
to see an end-to-end example of how it works. Then be sure to check out how to
117+
[start using OBI](/docs/zero-code/obi/setup/) for your application.
118+
119+
Have you already tried header enrichment? Let us know how it went. Find us on
120+
the
121+
[`#otel-ebpf-instrumentation` CNCF Slack channel](https://cloud-native.slack.com/archives/C06DQ7S2YEP),
122+
or
123+
[open a discussion](https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/discussions)
124+
if you have feedback that could help shape future releases.
219 KB
Loading
224 KB
Loading
29.7 KB
Loading
228 KB
Loading

static/refcache.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11403,6 +11403,10 @@
1140311403
"StatusCode": 206,
1140411404
"LastSeen": "2026-03-17T09:54:42.999934807Z"
1140511405
},
11406+
"https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/tree/b1f159092a3743464e53e78b16f0c4d817c47e02/examples/http-header-enrichment-demo": {
11407+
"StatusCode": 206,
11408+
"LastSeen": "2026-04-07T18:43:59.342178912Z"
11409+
},
1140611410
"https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/tree/f6deabc4387de1e0bf4b2acdbc674f7601d4c7f2/internal/test/integration?from_branch=main": {
1140711411
"StatusCode": 206,
1140811412
"LastSeen": "2026-03-17T09:54:36.82748599Z"

0 commit comments

Comments
 (0)