This specification is maintained by the AgentRules Working Group. Have enhancements or want to claim maintainership?Submit Specification →
devopscritical PriorityID: opentelemetry-arrow-columnar-ingestion-standard-opentelemetry-ar-221

OpenTelemetry Arrow Columnar Protocol High-Throughput Ingestion Standard

Enforces Apache Arrow columnar zero-copy serialization for high-volume trace and metric telemetry delivery across edge nodes prior to network egress. Eliminates standard row-oriented OTLP protobuf serialization bottlenecks and reduces CPU/memory pressure on ingestion collectors by preserving Arrow RecordBatch chunking semantics throughout the export pipeline.

Prohibited Anti-Pattern: Row-by-Row OTLP Protobuf Serialization at High Egress Telemetry Volumes

Export Ready-to-Drop Configuration

Select format below to copy code or download file directly.

---
description: OpenTelemetry Arrow Columnar Protocol High-Throughput Ingestion Standard - Enforces Apache Arrow columnar zero-copy serialization for high-volume trace and metric telemetry delivery across edge nodes prior to network egress. Eliminates standard row-oriented OTLP protobuf serialization bottlenecks and reduces CPU/memory pressure on ingestion collectors by preserving Arrow RecordBatch chunking semantics throughout the export pipeline.
globs: src/**/*.{ts,js,go,rs,py}, otelcol-builder.yaml, collector-config.{yaml,yml}
alwaysApply: true
verified_by: "agentrules.org"
license: "CC-BY-4.0"
source: "https://agentrules.org/rules/opentelemetry-arrow-columnar-ingestion-standard-opentelemetry-ar-221"
---

# OpenTelemetry Arrow Columnar Protocol High-Throughput Ingestion Standard

> **Severity**: CRITICAL | **Category**: devops
> **Anti-Pattern Warning**: Row-by-Row OTLP Protobuf Serialization at High Egress Telemetry Volumes

## System Constraints
You are a Principal Infrastructure & Observability Architect enforcing the OpenTelemetry Arrow Columnar Ingestion Standard. You must mandate zero-copy Apache Arrow batch serialization for telemetry pipelines exceeding edge egress thresholds. Prohibit standard row-oriented OTLP over standard HTTP/JSON or uncompressed Protobuf across edge egress boundaries. Enforce proper RecordBatch memory reclamation, dictionary encoding for repetitive span/metric attributes, and schema evolution guards.

## Strict Guidelines
- Engineers MUST ALWAYS route telemetry through an Arrow-enabled OTLP exporter (e.g., otelarrowexporter) or directly generate columnar Arrow RecordBatches when egress volume exceeds 5,000 spans/sec or 50,000 metric datapoints/sec.
- Engineers MUST NOT convert columnar trace/metric batches back into individual row-oriented Protobuf structures within intermediary transformation stages or custom forwarders.
- Engineers MUST configure dictionary encoding on high-cardinality string attributes (such as service.name, host.id, http.route, and status_code) inside Arrow schemas to minimize transport overhead and memory footprints.
- Services MUST enforce strict memory buffer limits (`limit_mib` / `spike_limit_mib`) using the memory limiter processor in conjunction with Arrow stream batchers to avoid out-of-memory (OOM) faults during upstream network backpressure.
- Components NEVER drop stream headers or mutate the stream identifier (`arrow-stream-id`) during continuous Arrow IPC stream transmission, as this causes catastrophic collector-side schema de-synchronization.

## Bad vs Good Implementations
### OTel Collector Arrow Exporter and Pipeline Configuration

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: Standard OTLP protobuf serialization forces repetitive row-by-row encoding of repeated metadata and attribute keys. Under high edge volumes, this leads to significant CPU spikes, high GC pressure, and 3x-10x higher bandwidth utilization compared to columnar formats.
```yaml
# BAD: Using standard row-oriented OTLP gRPC exporter for high-volume edge egress
receivers:
  otlp:
    protocols:
      grpc: { endpoint: 0.0.0.0:4317 }

processors:
  batch:
    send_batch_size: 10000
    timeout: 10s

exporters:
  otlp:
    endpoint: "central-ingest.internal:4317"
    compression: gzip
    tls:
      insecure: false

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlp]
```

#### Production Standard (Correct)
> **Standard**: The otelarrow exporter transforms telemetry payloads into Apache Arrow RecordBatches, applying dictionary encoding across shared schemas and leveraging Zstandard compression. This eliminates duplicate string keys across spans and delivers order-of-magnitude improvements in throughput and compression ratio with minimal serialization overhead.
```yaml
# GOOD: Implementing otelarrowexporter with zero-copy stream chunking and dictionary encoding
receivers:
  otlp:
    protocols:
      grpc: { endpoint: 0.0.0.0:4317 }

processors:
  memory_limiter:
    check_interval: 1s
    limit_mib: 1536
    spike_limit_mib: 512
  batch:
    send_batch_size: 32768
    timeout: 500ms

exporters:
  otelarrow:
    endpoint: "central-ingest.internal:4317"
    arrow:
      num_streams: 4
      max_stream_lifetime: 1h
    compression: zstd
    tls:
      insecure: false

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [memory_limiter, batch]
      exporters: [otelarrow]
```

### Zero-Copy Arrow RecordBatch Telemetry Buffering in Go

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: Row-by-row map allocation and JSON/standard marshal cycles result in millions of heap allocations, severe heap fragmentation, and complete loss of memory locality, destroying throughput at the edge.
```go
// BAD: Inefficient serialization iterating row-by-row and allocating maps per span
func exportTelemetryRows(spans []SpanRecord) [][]byte {
    var serialized [][]byte
    for _, span := range spans {
        payload := map[string]interface{}{
            "trace_id": span.TraceID,
            "service":  span.ServiceName,
            "duration": span.DurationNs,
            "attrs":    span.Attributes,
        }
        data, _ := json.Marshal(payload)
        serialized = append(serialized, data)
    }
    return serialized
}
```

#### Production Standard (Correct)
> **Standard**: Utilizes Apache Arrow's columnar record builders with memory pooling and dictionary encoding. Telemetry attributes are laid out contiguously in memory, enabling zero-copy network buffer transfers and minimal allocation overhead.
```go
// GOOD: Direct columnar builder with dictionary encoding and zero-copy RecordBatch
func exportTelemetryBatch(pool memory.Allocator, spans []SpanRecord) (arrow.Record, error) {
    schema := arrow.NewSchema([]arrow.Field{
        {Name: "trace_id", Type: arrow.BinaryTypes.Binary},
        {Name: "service", Type: &arrow.DictionaryType{IndexType: arrow.PrimitiveTypes.Int32, ValueType: arrow.BinaryTypes.String}},
        {Name: "duration_ns", Type: arrow.PrimitiveTypes.Int64},
    }, nil)

    builder := array.NewRecordBuilder(pool, schema)
    defer builder.Release()

    traceBuilder := builder.Field(0).(*array.BinaryBuilder)
    serviceBuilder := builder.Field(1).(*array.BinaryDictionaryBuilder)
    durationBuilder := builder.Field(2).(*array.Int64Builder)

    for _, span := range spans {
        traceBuilder.Append(span.TraceID)
        _ = serviceBuilder.AppendString(span.ServiceName)
        durationBuilder.Append(span.DurationNs)
    }

    rec := builder.NewRecord()
    return rec, nil
}
```

Architectural Specification & Invariant Rationale

Architectural Invariant Design: OpenTelemetry Arrow Columnar Protocol High-Throughput Ingestion Standard

OpenTelemetry Arrow Columnar Protocol High-Throughput Ingestion Standard defines an industrial-grade behavioral standard for devops engineering. Enforces Apache Arrow columnar zero-copy serialization for high-volume trace and metric telemetry delivery across edge nodes prior to network egress. Eliminates standard row-oriented OTLP protobuf serialization bottlenecks and reduces CPU/memory pressure on ingestion collectors by preserving Arrow RecordBatch chunking semantics throughout the export pipeline. 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: Row-by-Row OTLP Protobuf Serialization at High Egress Telemetry Volumes 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 DriftRow-by-Row OTLP Protobuf Serialization at High Egress Telemetry VolumesCritical
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 route telemetry through an Arrow-enabled OTLP exporter (e.g., otelarrowexporter) or directly generate columnar Arrow RecordBatches when egress volume exceeds 5,000 spans/sec or 50,000 metric datapoints/sec.

Engineers MUST ALWAYS route telemetry through an Arrow-enabled OTLP exporter (e.g., otelarrowexporter) or directly generate columnar Arrow RecordBatches when egress volume exceeds 5,000 spans/sec or 50,000 metric datapoints/sec.

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 convert columnar trace/metric batches back into individual row-oriented Protobuf structures within intermediary transformation stages or custom forwarders.

Engineers MUST NOT convert columnar trace/metric batches back into individual row-oriented Protobuf structures within intermediary transformation stages or custom forwarders.

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

Engineers MUST configure dictionary encoding on high-cardinality string attributes (such as service.name, host.id, http.route, and status_code) inside Arrow schemas to minimize transport overhead and memory footprints.

Engineers MUST configure dictionary encoding on high-cardinality string attributes (such as service.name, host.id, http.route, and status_code) inside Arrow schemas to minimize transport overhead and memory footprints.

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

Services MUST enforce strict memory buffer limits (`limit_mib` / `spike_limit_mib`) using the memory limiter processor in conjunction with Arrow stream batchers to avoid out-of-memory (OOM) faults during upstream network backpressure.

Services MUST enforce strict memory buffer limits (`limit_mib` / `spike_limit_mib`) using the memory limiter processor in conjunction with Arrow stream batchers to avoid out-of-memory (OOM) faults during upstream network backpressure.

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 drop stream headers or mutate the stream identifier (`arrow-stream-id`) during continuous Arrow IPC stream transmission, as this causes catastrophic collector-side schema de-synchronization.

Components NEVER drop stream headers or mutate the stream identifier (`arrow-stream-id`) during continuous Arrow IPC stream transmission, as this causes catastrophic collector-side schema de-synchronization.

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 Arrow Columnar Protocol High-Throughput Ingestion Standard critical for AI coding assistants?

Enforces Apache Arrow columnar zero-copy serialization for high-volume trace and metric telemetry delivery across edge nodes prior to network egress. Eliminates standard row-oriented OTLP protobuf serialization bottlenecks and reduces CPU/memory pressure on ingestion collectors by preserving Arrow RecordBatch chunking semantics throughout the export pipeline. 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 (Row-by-Row OTLP Protobuf Serialization at High Egress Telemetry Volumes) 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