Skip to content

docs: ADR 0011 — on-node eBPF CPU profiling - #25

Merged
kfeofantov merged 1 commit into
mainfrom
docs/adr-0011-ebpf-profiling
Aug 11, 2026
Merged

kfeofantov merged 1 commit into
mainfrom
docs/adr-0011-ebpf-profiling

Conversation

@kfeofantov

Copy link
Copy Markdown
Contributor

Slice 1 of the eBPF node-profiling feature: the ADR-first design gate. Docs only, no runtime code.

What this decides (ADR 0011)

  • Embed go.opentelemetry.io/ebpf-profiler as a library (no own profiler); symbolize on the node — client binaries never leave their node.
  • CAP_BPF + CAP_PERFMON, never privileged, gated on kernel 5.8+ with a graceful refusal + counter (scanner role unaffected).
  • Config-bounded targeting query: the node asks the controller which of its already-permitted workloads rank top-N by consumption. Framed as a scoped exception to ADR 0010 §1 — the node's ConfigMap bounds the eligible set and every ceiling (N, duration, frequency, rotation, overhead); the controller can only prioritize within what config already allows, never widen it. Invariant 1 (agent↔backend) untouched; the inventory channel stays ack-only. Residual risk stated in an honest-tradeoff section.
  • On-node symbol filtering: client module-path allow-list + stdlib/runtime kept; third-party dropped by default; only kept frames + aggregate drop counts leave.
  • Validation (parses, cpu/nanoseconds, service funcs in top) → invalid dropped + counted, never sent.
  • Spool payload = pprof bytes + key (source=ebpf); golden-tested wrapper.
  • GPL-2.0 isolation (own dir + LICENSE) + repo-root NOTICE.

Also in this PR

  • security.md §7.2 (capabilities, kernel gate, node-side symbolization, config-bounded targeting) and §8 (symbol-filter policy, validation, eBPF ≠ PGO).
  • docs/spikes/ebpf-pgo.md: the PGO spike record — eBPF output omits Function.start_line, so go build -pgo fails → PGO deferred; eBPF is flame-graphs/coverage only. Scrubbed for public docs.

Not in this PR

Implementation lands in later slices: kernel-gate + manifest capabilities → profiler+reporter integration → symbol filtering → validation+spool+golden → targeting → kind e2e.

🤖 Generated with Claude Code

Decide the node-role eBPF CPU profiler ahead of implementation (ADR-first).

- ADR 0011: embed go.opentelemetry.io/ebpf-profiler as a library (no own
  profiler), symbolize on the node so client binaries never leave it;
  CAP_BPF+CAP_PERFMON with no privileged and a kernel-5.8+ graceful refusal;
  a config-bounded node->controller targeting query framed as a scoped
  exception to 0010 §1 (the node's ConfigMap bounds the eligible set and all
  ceilings, the controller can only prioritize within them); on-node symbol
  allow-list filtering; profile validation; spool payload keyed source=ebpf;
  GPL-2.0 isolation + NOTICE. Records the PGO-spike outcome: eBPF feeds
  flame graphs/coverage, not PGO (deferred).
- security.md §7.2: pin capabilities, kernel gate, node-side symbolization,
  config-bounded targeting.
- security.md §8: symbol-filter policy (client allow-list + stdlib/runtime
  kept, third-party dropped by default), on-node validation, eBPF != PGO.
- docs/spikes/ebpf-pgo.md: the PGO spike record (eBPF output omits
  Function.start_line -> `go build -pgo` fails), scrubbed for public docs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kfeofantov
kfeofantov merged commit dce6ae6 into main Aug 11, 2026
3 checks passed
@kfeofantov
kfeofantov deleted the docs/adr-0011-ebpf-profiling branch August 11, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant