This specification is maintained by the AgentRules Working Group. Have enhancements or want to claim maintainership?Submit Specification →
devopscritical PriorityID: otel-ebpf-profiler-frame-pointerless-unwinding

OpenTelemetry eBPF Continuous Profiler Frame-Pointerless Stack Unwinding Standard

Mandates build pipeline configuration, kernel capability scoping, and unwinding table preservation for OpenTelemetry eBPF continuous profiling across hybrid Go, Rust, and V8 workloads. Ensures zero-overhead out-of-band unwinding without frame pointers while preventing broken call chains and kernel verifier rejections.

Prohibited Anti-Pattern: Stripping Unwind Tables and Missing Host Process Namespace Access in Profiler DaemonSets

Export Ready-to-Drop Configuration

Select format below to copy code or download file directly.

---
description: OpenTelemetry eBPF Continuous Profiler Frame-Pointerless Stack Unwinding Standard - Mandates build pipeline configuration, kernel capability scoping, and unwinding table preservation for OpenTelemetry eBPF continuous profiling across hybrid Go, Rust, and V8 workloads. Ensures zero-overhead out-of-band unwinding without frame pointers while preventing broken call chains and kernel verifier rejections.
globs: Dockerfile*, **/Dockerfile*, deploy/**/*.yaml, k8s/**/*.yaml, helm/**/*.yaml, Cargo.toml, Makefile
alwaysApply: true
verified_by: "agentrules.org"
license: "CC-BY-4.0"
source: "https://agentrules.org/rules/otel-ebpf-profiler-frame-pointerless-unwinding"
---

# OpenTelemetry eBPF Continuous Profiler Frame-Pointerless Stack Unwinding Standard

> **Severity**: CRITICAL | **Category**: devops
> **Anti-Pattern Warning**: Stripping Unwind Tables and Missing Host Process Namespace Access in Profiler DaemonSets

## System Constraints
You are a Principal DevOps and Systems Architect enforcing OpenTelemetry eBPF continuous profiling standards for frame-pointerless unwinding. Mandate that all production build pipelines retain `.eh_frame` and `.sframe` unwind sections without stripping, configure container runtimes to expose host namespaces and specific Linux capabilities (`CAP_BPF`, `CAP_PERFMON`, `CAP_SYS_PTRACE`) rather than indiscriminate full privileges, and configure V8 and Go runtimes to export symbols and unwind structures accessible to kernel-space BPF programs.

## Strict Guidelines
- Engineers MUST ALWAYS preserve `.eh_frame` and `.eh_frame_hdr` sections during binary compilation and strip passes (e.g., using `objcopy --strip-debug` instead of `strip -s` or `--strip-all`) to enable compact DWARF unwind table generation for eBPF kernel unwinding.
- Engineers MUST NOT compile Rust with `panic = "abort"` without explicitly setting `-C force-unwind-tables=yes` when frame pointers are omitted (`-C force-frame-pointers=no`).
- Services running V8/Node.js MUST enable `--perf-prof` or `--perf-basic-prof` and mount `/tmp` as a shared in-memory volume across pods to allow the OpenTelemetry eBPF profiler to map dynamic JIT frame addresses to symbols.
- DaemonSets for OpenTelemetry eBPF Profilers MUST set `hostPID: true` and mount `/proc`, `/sys/kernel/debug`, `/sys/fs/bpf`, and `/sys/kernel/tracing` with appropriate read-only host path permissions to inspect hybrid task stack boundaries.
- Components NEVER grant unconstrained `privileged: true` to continuous profiling agents; deployments MUST scope Linux capabilities precisely to `CAP_BPF`, `CAP_PERFMON`, `CAP_SYS_PTRACE`, `CAP_CHECKPOINT_RESTORE`, and `CAP_DAC_READ_SEARCH`.

## Bad vs Good Implementations
### OpenTelemetry eBPF Profiler Kubernetes DaemonSet Configuration

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: Disabling `hostPID` prevents the eBPF agent from resolving namespaces and mapping PIDs to target container process trees for stack collection. Using `privileged: true` violates least-privilege security standards, and omitting required kernel mounts (`/sys/fs/bpf`, `/sys/kernel/debug`) fails BPF map initialization.
```yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: otel-ebpf-profiler
  namespace: monitoring
spec:
  selector:
    matchLabels:
      app: otel-ebpf-profiler
  template:
    metadata:
      labels:
        app: otel-ebpf-profiler
    spec:
      # CRITICAL FLAW: Missing hostPID prevents mapping container PIDs to host kernel threads
      hostPID: false
      containers:
        - name: profiler
          image: otel/ebpf-profiler:latest
          securityContext:
            # ANTI-PATTERN: Overly broad privilege escalation without explicit capability bounds
            privileged: true
          volumeMounts:
            - name: root
              mountPath: /host
      volumes:
        - name: root
          hostPath:
            path: /
```

#### Production Standard (Correct)
> **Standard**: Correctly specifies `hostPID: true` for unified PID namespace unwinding across Go, Rust, and V8 runtimes. Uses granular, modern Linux capabilities (`BPF`, `PERFMON`, `SYS_PTRACE`) instead of `privileged: true`, and safely mounts targeted kernel debug and trace points alongside `/tmp` for V8 JIT symbol maps.
```yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: otel-ebpf-profiler
  namespace: monitoring
spec:
  selector:
    matchLabels:
      app: otel-ebpf-profiler
  template:
    metadata:
      labels:
        app: otel-ebpf-profiler
    spec:
      hostPID: true
      containers:
        - name: profiler
          image: otel/ebpf-profiler:0.11.0
          securityContext:
            privileged: false
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            capabilities:
              drop:
                - ALL
              add:
                - BPF
                - PERFMON
                - SYS_PTRACE
                - DAC_READ_SEARCH
                - CHECKPOINT_RESTORE
          volumeMounts:
            - name: sys-kernel-debug
              mountPath: /sys/kernel/debug
              readOnly: true
            - name: sys-fs-bpf
              mountPath: /sys/fs/bpf
            - name: proc
              mountPath: /proc
              readOnly: true
            - name: node-tmp
              mountPath: /tmp
              readOnly: true
      volumes:
        - name: sys-kernel-debug
          hostPath:
            path: /sys/kernel/debug
        - name: sys-fs-bpf
          hostPath:
            path: /sys/fs/bpf
        - name: proc
          hostPath:
            path: /proc
        - name: node-tmp
          hostPath:
            path: /tmp
```

Architectural Specification & Invariant Rationale

Architectural Invariant Design: OpenTelemetry eBPF Continuous Profiler Frame-Pointerless Stack Unwinding Standard

OpenTelemetry eBPF Continuous Profiler Frame-Pointerless Stack Unwinding Standard defines an industrial-grade behavioral standard for devops engineering. Mandates build pipeline configuration, kernel capability scoping, and unwinding table preservation for OpenTelemetry eBPF continuous profiling across hybrid Go, Rust, and V8 workloads. Ensures zero-overhead out-of-band unwinding without frame pointers while preventing broken call chains and kernel verifier rejections. Modern software architectures require strict adherence to deterministic patterns to guarantee high availability, maintainability, and zero security vulnerabilities.

Framework Paradigm Shift & Drift MechanicsLLMs are trained on millions of open-source repositories containing outdated code, legacy idioms, and unpatched antipatterns. When coding assistants generate implementations for this stack, they default to common statistical tokens: Stripping Unwind Tables and Missing Host Process Namespace Access in Profiler DaemonSets Without an explicit system instruction file, developers spend hours debugging silent failures.
Failure Modes & Production Blast Radius

Hazard Analysis: What Breaks Without This Rule

The following failure modes have been cataloged from hundreds of hours of production code reviews where AI assistants produced non-compliant implementations:

Failure ModeAI Symptom (The Anti-Pattern)SeverityProduction Impact & Remedy
AI Hallucination & Deprecation DriftStripping Unwind Tables and Missing Host Process Namespace Access in Profiler DaemonSetsCritical
Violating this industrial standard introduces regression bugs, security risks, and unexpected runtime failures in production.
Enforce explicit behavioral system directives across all AI coding assistants in your repository.
Silent Architecture InconsistencyAI assistants produce mixed paradigms across files, creating fragmented codebase conventions.Medium
Increases cognitive load during code reviews and leads to maintenance debt across engineering teams.
Pin project conventions in .cursor/rules, CLAUDE.md, and AGENTS.md so all team agents follow identical guardrails.
Architectural Directives in Detail

Step-by-Step Production Directives

Each rule constraint below is injected into the AI agent's system prompt to establish deterministic boundaries:

1

Engineers MUST ALWAYS preserve `.eh_frame` and `.eh_frame_hdr` sections during binary compilation and strip passes (e.g., using `objcopy --strip-debug` instead of `strip -s` or `--strip-all`) to enable compact DWARF unwind table generation for eBPF kernel unwinding.

Engineers MUST ALWAYS preserve `.eh_frame` and `.eh_frame_hdr` sections during binary compilation and strip passes (e.g., using `objcopy --strip-debug` instead of `strip -s` or `--strip-all`) to enable compact DWARF unwind table generation for eBPF kernel unwinding.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
2

Engineers MUST NOT compile Rust with `panic = "abort"` without explicitly setting `-C force-unwind-tables=yes` when frame pointers are omitted (`-C force-frame-pointers=no`).

Engineers MUST NOT compile Rust with `panic = "abort"` without explicitly setting `-C force-unwind-tables=yes` when frame pointers are omitted (`-C force-frame-pointers=no`).

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
3

Services running V8/Node.js MUST enable `--perf-prof` or `--perf-basic-prof` and mount `/tmp` as a shared in-memory volume across pods to allow the OpenTelemetry eBPF profiler to map dynamic JIT frame addresses to symbols.

Services running V8/Node.js MUST enable `--perf-prof` or `--perf-basic-prof` and mount `/tmp` as a shared in-memory volume across pods to allow the OpenTelemetry eBPF profiler to map dynamic JIT frame addresses to symbols.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
4

DaemonSets for OpenTelemetry eBPF Profilers MUST set `hostPID

DaemonSets for OpenTelemetry eBPF Profilers MUST set `hostPID: true` and mount `/proc`, `/sys/kernel/debug`, `/sys/fs/bpf`, and `/sys/kernel/tracing` with appropriate read-only host path permissions to inspect hybrid task stack boundaries.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
5

Components NEVER grant unconstrained `privileged

Components NEVER grant unconstrained `privileged: true` to continuous profiling agents; deployments MUST scope Linux capabilities precisely to `CAP_BPF`, `CAP_PERFMON`, `CAP_SYS_PTRACE`, `CAP_CHECKPOINT_RESTORE`, and `CAP_DAC_READ_SEARCH`.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
Technical Questions & Answers

Frequently Asked Technical Questions

Common questions developers face when configuring AI coding assistants for this stack:

Q:Why is OpenTelemetry eBPF Continuous Profiler Frame-Pointerless Stack Unwinding Standard critical for AI coding assistants?

Mandates build pipeline configuration, kernel capability scoping, and unwinding table preservation for OpenTelemetry eBPF continuous profiling across hybrid Go, Rust, and V8 workloads. Ensures zero-overhead out-of-band unwinding without frame pointers while preventing broken call chains and kernel verifier rejections. Without explicit behavioral boundaries, AI coding assistants (Cursor, Claude Code, Windsurf, Codex) rely on training data averages, which frequently produce deprecated, inefficient, or vulnerable code patterns.

Q:How does adopting this rule prevent AI hallucinations?

This rule explicitly declares what the AI must avoid (Stripping Unwind Tables and Missing Host Process Namespace Access in Profiler DaemonSets) and prescribes verified positive examples. Grounding the LLM with negative and positive pairs eliminates guesswork.

Q:Which AI coding environments are supported?

This specification is multi-platform compatible: Cursor (.cursor/rules/*.mdc & .cursorrules), Anthropic Claude Code (CLAUDE.md), Windsurf (.windsurfrules), Codex / Cline (AGENTS.md), and GitHub Copilot (.github/copilot-instructions.md).

Q:Can I combine this rule with other technology stacks?

Yes. Use the Interactive Stack Builder or download an Agent Pack to merge this rule with other frontend, backend, database, security, and DevOps rules without syntax collision.

Open Specification · CC BY 4.0·Free for Personal, Team & Commercial In-Repo Use

Citation & Open Source Attribution Guidelines

This specification is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). You are completely free to adapt and share this rule in your workspace. If citing, including in public AI benchmark datasets, or redistributing, attribution to AgentRules.org is required.

1 Rule in Stack

OpenTelemetry