This specification is maintained by the AgentRules Working Group. Have enhancements or want to claim maintainership?Submit Specification →
devopscritical PriorityID: otel-arrow-columnar-stream-backpressure-governor

OpenTelemetry OTLP/Arrow Columnar Stream Backpressure Invariant

Prevents OpenTelemetry Collector OOM-kills during massive telemetry and high-cardinality metric spikes by enforcing Apache Arrow schema-batched columnar compression coupled with strict memory-limiter governors and bounded gRPC stream backpressure. Without hard admission bounds and columnar stream limits, standard Protobuf row-based deserialization exhausts node memory buffers before the collector can drop or flush payloads.

Prohibited Anti-Pattern: Unbounded Protobuf OTLP Ingestion Without Arrow Columnar Batching or Upstream Flow Control

Export Ready-to-Drop Configuration

Select format below to copy code or download file directly.

---
description: OpenTelemetry OTLP/Arrow Columnar Stream Backpressure Invariant - Prevents OpenTelemetry Collector OOM-kills during massive telemetry and high-cardinality metric spikes by enforcing Apache Arrow schema-batched columnar compression coupled with strict memory-limiter governors and bounded gRPC stream backpressure. Without hard admission bounds and columnar stream limits, standard Protobuf row-based deserialization exhausts node memory buffers before the collector can drop or flush payloads.
globs: **/otel-collector*.{yaml,yml}, **/collector/**/*.{yaml,yml}, infra/k8s/**/*.{yaml,yml}, deploy/**/*.{yaml,yml}
alwaysApply: true
verified_by: "agentrules.org"
license: "CC-BY-4.0"
source: "https://agentrules.org/rules/otel-arrow-columnar-stream-backpressure-governor"
---

# OpenTelemetry OTLP/Arrow Columnar Stream Backpressure Invariant

> **Severity**: CRITICAL | **Category**: devops
> **Anti-Pattern Warning**: Unbounded Protobuf OTLP Ingestion Without Arrow Columnar Batching or Upstream Flow Control

## System Constraints
You are a Principal Software Architect enforcing production reliability standards for telemetry pipelines. You must mandate the use of OpenTelemetry-Arrow columnar stream encoding, strict memory_limiter placement, and memory-bounded gRPC stream flow control across all OpenTelemetry Collector pipelines to eliminate OOM-killer termination under metric burst conditions.

## Strict Guidelines
- Collectors MUST ALWAYS position the `memory_limiter` processor as the FIRST processor in every telemetry pipeline (metrics, traces, logs).
- Engineers MUST NOT rely on default standard row-based Protobuf OTLP receivers for high-throughput metric ingestion (>50k metrics/sec per node).
- The `arrow` receiver and exporter extensions MUST configure strict `admission_limit` and bounded memory limits to reject incoming records before deserialization exhausts heap memory.
- The `memory_limiter` MUST define explicit values for `check_interval`, `limit_percentage`, and `spike_limit_percentage` (or explicit `limit_mib` / `spike_limit_mib`), reserving at least 20% headroom beneath Kubernetes container cgroup hard memory limits.
- Pipelines MUST enforce backpressure propagation by configuring bounded `sending_queue` with explicit drop or block semantics instead of unbounded in-memory queues.
- Services MUST enable gRPC keepalive and HTTP/2 window size constraints on Arrow stream endpoints to prevent memory amplification during network stalls.

## Bad vs Good Implementations
### OTel Collector Pipeline: Arrow Columnar Stream with Memory Limiter

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: Standard row-based Protobuf ingestion without a memory_limiter processor causes catastrophic memory spikes during metric surges. Telemetry frames are parsed into large in-memory object trees before batching, quickly exceeding cgroup limits and causing SIGKILL before the collector can apply backpressure.
```yaml
# Anti-Pattern: Unbounded standard OTLP receiver with missing memory governor
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318

processors:
  batch:
    send_batch_size: 8192
    timeout: 5s

exporters:
  otlp:
    endpoint: otel-gateway.monitoring:4317
    tls:
      insecure: true

service:
  pipelines:
    metrics:
      receivers: [otlp]
      # BAD: Memory limiter is completely omitted; Protobuf deserialization causes OOM during metric bursts
      processors: [batch]
      exporters: [otlp]
```

#### Production Standard (Correct)
> **Standard**: Arrow columnar format drastically reduces memory footprints by transmitting column-oriented RecordBatches. The memory_limiter processor is configured as the first processor with conservative 75% heap limit and 20% spike tolerance, returning gRPC RESOURCE_EXHAUSTED (backpressure) to clients before cgroup OOM occurs.
```yaml
# Production Invariant: Apache Arrow receiver with strict memory-limiter and queue bounds
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
        arrow:
          # Enables Arrow columnar decoding with stream admission constraints
          max_stream_lifetime: 2h
      http:
        endpoint: 0.0.0.0:4318

processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 75
    spike_limit_percentage: 20
  batch:
    send_batch_size: 10000
    timeout: 2s

exporters:
  otlp:
    endpoint: otel-gateway.monitoring:4317
    arrow:
      enabled: true
      num_streams: 2
    sending_queue:
      enabled: true
      num_consumers: 4
      queue_size: 1000
    retry_on_failure:
      enabled: true
      initial_interval: 1s
      max_interval: 30s

service:
  pipelines:
    metrics:
      receivers: [otlp]
      # GOOD: memory_limiter is FIRST; drops/backpressures before memory starvation
      processors: [memory_limiter, batch]
      exporters: [otlp]
```

Architectural Specification & Invariant Rationale

Architectural Invariant Design: OpenTelemetry OTLP/Arrow Columnar Stream Backpressure Invariant

OpenTelemetry OTLP/Arrow Columnar Stream Backpressure Invariant defines an industrial-grade behavioral standard for devops engineering. Prevents OpenTelemetry Collector OOM-kills during massive telemetry and high-cardinality metric spikes by enforcing Apache Arrow schema-batched columnar compression coupled with strict memory-limiter governors and bounded gRPC stream backpressure. Without hard admission bounds and columnar stream limits, standard Protobuf row-based deserialization exhausts node memory buffers before the collector can drop or flush payloads. 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: Unbounded Protobuf OTLP Ingestion Without Arrow Columnar Batching or Upstream Flow Control 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 DriftUnbounded Protobuf OTLP Ingestion Without Arrow Columnar Batching or Upstream Flow ControlCritical
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

Collectors MUST ALWAYS position the `memory_limiter` processor as the FIRST processor in every telemetry pipeline (metrics, traces, logs).

Collectors MUST ALWAYS position the `memory_limiter` processor as the FIRST processor in every telemetry pipeline (metrics, traces, logs).

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 rely on default standard row-based Protobuf OTLP receivers for high-throughput metric ingestion (>50k metrics/sec per node).

Engineers MUST NOT rely on default standard row-based Protobuf OTLP receivers for high-throughput metric ingestion (>50k metrics/sec per node).

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

The `arrow` receiver and exporter extensions MUST configure strict `admission_limit` and bounded memory limits to reject incoming records before deserialization exhausts heap memory.

The `arrow` receiver and exporter extensions MUST configure strict `admission_limit` and bounded memory limits to reject incoming records before deserialization exhausts heap memory.

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

The `memory_limiter` MUST define explicit values for `check_interval`, `limit_percentage`, and `spike_limit_percentage` (or explicit `limit_mib` / `spike_limit_mib`), reserving at least 20% headroom beneath Kubernetes container cgroup hard memory limits.

The `memory_limiter` MUST define explicit values for `check_interval`, `limit_percentage`, and `spike_limit_percentage` (or explicit `limit_mib` / `spike_limit_mib`), reserving at least 20% headroom beneath Kubernetes container cgroup hard memory limits.

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

Pipelines MUST enforce backpressure propagation by configuring bounded `sending_queue` with explicit drop or block semantics instead of unbounded in-memory queues.

Pipelines MUST enforce backpressure propagation by configuring bounded `sending_queue` with explicit drop or block semantics instead of unbounded in-memory queues.

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.
6

Services MUST enable gRPC keepalive and HTTP/2 window size constraints on Arrow stream endpoints to prevent memory amplification during network stalls.

Services MUST enable gRPC keepalive and HTTP/2 window size constraints on Arrow stream endpoints to prevent memory amplification during network stalls.

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 OTLP/Arrow Columnar Stream Backpressure Invariant critical for AI coding assistants?

Prevents OpenTelemetry Collector OOM-kills during massive telemetry and high-cardinality metric spikes by enforcing Apache Arrow schema-batched columnar compression coupled with strict memory-limiter governors and bounded gRPC stream backpressure. Without hard admission bounds and columnar stream limits, standard Protobuf row-based deserialization exhausts node memory buffers before the collector can drop or flush payloads. 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 (Unbounded Protobuf OTLP Ingestion Without Arrow Columnar Batching or Upstream Flow Control) 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