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

OpenTelemetry Collector OTLP/Arrow Columnar Batching Backpressure Standard

Defines mandatory memory limits, queue sizing, and columnar batch constraints for OpenTelemetry Collector pipelines utilizing OTLP/Arrow. Prevents runaway memory allocation, heap fragmentation, and cascading node OOM crashes during telemetry bursts by coupling Arrow dictionary limits with strict upstream backpressure signaling.

Prohibited Anti-Pattern: Unbounded Arrow record building with decoupled queue-per-worker pipelines triggering SIGKILL during incident trace storms

Export Ready-to-Drop Configuration

Select format below to copy code or download file directly.

---
description: OpenTelemetry Collector OTLP/Arrow Columnar Batching Backpressure Standard - Defines mandatory memory limits, queue sizing, and columnar batch constraints for OpenTelemetry Collector pipelines utilizing OTLP/Arrow. Prevents runaway memory allocation, heap fragmentation, and cascading node OOM crashes during telemetry bursts by coupling Arrow dictionary limits with strict upstream backpressure signaling.
globs: **/otel-collector*.yaml, **/otel-collector*.yml, **/collector-config*.yaml, **/helm/**/values*.yaml, **/config/otel/*.yaml
alwaysApply: true
verified_by: "agentrules.org"
license: "CC-BY-4.0"
source: "https://agentrules.org/rules/otel-arrow-batching-backpressure-standard"
---

# OpenTelemetry Collector OTLP/Arrow Columnar Batching Backpressure Standard

> **Severity**: CRITICAL | **Category**: devops
> **Anti-Pattern Warning**: Unbounded Arrow record building with decoupled queue-per-worker pipelines triggering SIGKILL during incident trace storms

## System Constraints
You are a Principal Observability Infrastructure Engineer enforcing OpenTelemetry Collector OTLP/Arrow Columnar Batching Backpressure Standards. You must reject collector configurations that decouple memory_limiter from Arrow columnar record builders, lack bounded sending queues, omit dictionary memory limits, or fail to propagate gRPC RESOURCE_EXHAUSTED backpressure to upstream ingress points.

## Strict Guidelines
- Collectors MUST place 'memory_limiter' as the absolute FIRST processor in every pipeline definition before any batch or transformation processors.
- Pipelines utilizing OTLP/Arrow MUST explicitly configure receiver and exporter 'arrow' blocks with bounded memory allocations for columnar record batches and dictionary pools.
- The 'batch' processor send_batch_max_size MUST be strictly configured and coupled with send_batch_size to prevent unbounded columnar batch growth during high ingest rates.
- Exporter 'sending_queue' blocks MUST be bounded ('queue_size' <= 1000 items per pipeline or strictly measured against total cgroup limits) and MUST NEVER use unbound in-memory FIFO buffers.
- The 'memory_limiter' processor 'check_interval' MUST NOT exceed 1s, and 'limit_percentage' MUST be set to at most 80% of container cgroup memory limits to accommodate Arrow C++ / Go heap overhead.
- Upstream OTLP endpoints MUST rely on synchronous HTTP 429 / gRPC RESOURCE_EXHAUSTED return codes; drops MUST be handled upstream at SDK clients, NEVER silently in unbounded Collector heap buffers.
- Engineers MUST NOT disable Arrow payload schema caching without calculating the accompanying throughput degradation and allocation spike.

## Bad vs Good Implementations
### Insecure and Unbounded OTLP/Arrow Collector Pipeline Configuration

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: Omitting the memory_limiter as the first processor and allowing a sending_queue of 100,000 Arrow columnar tables will cause unbounded memory expansion during downstream latency spikes. When memory explodes, the Linux OOM killer sends SIGKILL to the collector, causing catastrophic trace loss without propagating backpressure to clients.
```yaml
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
        arrow: {}

processors:
  batch:
    send_batch_size: 10000
    timeout: 10s
  # ANTI-PATTERN: memory_limiter is missing or placed after heavy batching

pipelines:
  traces:
    receivers: [otlp]
    processors: [batch]
    exporters: [otlp/arrow]

exporters:
  otlp/arrow:
    endpoint: downstream.telemetry.svc.cluster.local:4317
    arrow:
      disabled: false
    sending_queue:
      enabled: true
      queue_size: 100000 # ANTI-PATTERN: 100k items in Arrow format exhausts 8GiB RAM instantly
```

#### Production Standard (Correct)
> **Standard**: Memory limiter is placed first to enforce early drops/backpressure. Arrow receiver memory pools are bounded to 1024 MiB, batch sizes have explicit upper boundaries (send_batch_max_size), and the sending queue is constrained to 1000 elements, ensuring memory usage stays strictly within Kubernetes pod limits even under severe network partitions.
```yaml
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
        arrow:
          memory_limit_mib: 1024 # Bounded columnar buffer

processors:
  memory_limiter:
    check_interval: 500ms
    limit_percentage: 75
    spike_limit_percentage: 20

  batch:
    send_batch_size: 4096
    send_batch_max_size: 8192
    timeout: 1s

exporters:
  otlp/arrow:
    endpoint: downstream.telemetry.svc.cluster.local:4317
    arrow:
      disabled: false
      num_streams: 4
    sending_queue:
      enabled: true
      num_consumers: 8
      queue_size: 1000 # Strictly capped queue
    retry_on_failure:
      enabled: true
      initial_interval: 1s
      max_interval: 10s
      max_elapsed_time: 30s

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [memory_limiter, batch] # Invariant: memory_limiter must be first
      exporters: [otlp/arrow]
```

Architectural Specification & Invariant Rationale

Architectural Invariant Design: OpenTelemetry Collector OTLP/Arrow Columnar Batching Backpressure Standard

OpenTelemetry Collector OTLP/Arrow Columnar Batching Backpressure Standard defines an industrial-grade behavioral standard for devops engineering. Defines mandatory memory limits, queue sizing, and columnar batch constraints for OpenTelemetry Collector pipelines utilizing OTLP/Arrow. Prevents runaway memory allocation, heap fragmentation, and cascading node OOM crashes during telemetry bursts by coupling Arrow dictionary limits with strict upstream backpressure signaling. 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 Arrow record building with decoupled queue-per-worker pipelines triggering SIGKILL during incident trace storms 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 Arrow record building with decoupled queue-per-worker pipelines triggering SIGKILL during incident trace stormsCritical
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 place 'memory_limiter' as the absolute FIRST processor in every pipeline definition before any batch or transformation processors.

Collectors MUST place 'memory_limiter' as the absolute FIRST processor in every pipeline definition before any batch or transformation processors.

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

Pipelines utilizing OTLP/Arrow MUST explicitly configure receiver and exporter 'arrow' blocks with bounded memory allocations for columnar record batches and dictionary pools.

Pipelines utilizing OTLP/Arrow MUST explicitly configure receiver and exporter 'arrow' blocks with bounded memory allocations for columnar record batches and dictionary pools.

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 'batch' processor send_batch_max_size MUST be strictly configured and coupled with send_batch_size to prevent unbounded columnar batch growth during high ingest rates.

The 'batch' processor send_batch_max_size MUST be strictly configured and coupled with send_batch_size to prevent unbounded columnar batch growth during high ingest rates.

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

Exporter 'sending_queue' blocks MUST be bounded ('queue_size' <= 1000 items per pipeline or strictly measured against total cgroup limits) and MUST NEVER use unbound in-memory FIFO buffers.

Exporter 'sending_queue' blocks MUST be bounded ('queue_size' <= 1000 items per pipeline or strictly measured against total cgroup limits) and MUST NEVER use unbound in-memory FIFO buffers.

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

The 'memory_limiter' processor 'check_interval' MUST NOT exceed 1s, and 'limit_percentage' MUST be set to at most 80% of container cgroup memory limits to accommodate Arrow C++ / Go heap overhead.

The 'memory_limiter' processor 'check_interval' MUST NOT exceed 1s, and 'limit_percentage' MUST be set to at most 80% of container cgroup memory limits to accommodate Arrow C++ / Go heap overhead.

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

Upstream OTLP endpoints MUST rely on synchronous HTTP 429 / gRPC RESOURCE_EXHAUSTED return codes

Upstream OTLP endpoints MUST rely on synchronous HTTP 429 / gRPC RESOURCE_EXHAUSTED return codes; drops MUST be handled upstream at SDK clients, NEVER silently in unbounded Collector heap buffers.

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

Engineers MUST NOT disable Arrow payload schema caching without calculating the accompanying throughput degradation and allocation spike.

Engineers MUST NOT disable Arrow payload schema caching without calculating the accompanying throughput degradation and allocation spike.

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 Collector OTLP/Arrow Columnar Batching Backpressure Standard critical for AI coding assistants?

Defines mandatory memory limits, queue sizing, and columnar batch constraints for OpenTelemetry Collector pipelines utilizing OTLP/Arrow. Prevents runaway memory allocation, heap fragmentation, and cascading node OOM crashes during telemetry bursts by coupling Arrow dictionary limits with strict upstream backpressure signaling. 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 Arrow record building with decoupled queue-per-worker pipelines triggering SIGKILL during incident trace storms) 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