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

OpenTelemetry Collector Connector Pipeline Non-Blocking Backpressure Standard

Enforces asynchronous, memory-bounded queueing and explicit shedding configurations on OpenTelemetry Collector connectors linking telemetry pipelines. Prevents downstream exporter slowdowns (such as metric stores or trace indices) from propagating blocking backpressure upstream and starving primary ingestion receivers.

Prohibited Anti-Pattern: Unbuffered Connector Cascades Exporter Delays Into Upstream Receiver Deadlocks

Export Ready-to-Drop Configuration

Select format below to copy code or download file directly.

---
description: OpenTelemetry Collector Connector Pipeline Non-Blocking Backpressure Standard - Enforces asynchronous, memory-bounded queueing and explicit shedding configurations on OpenTelemetry Collector connectors linking telemetry pipelines. Prevents downstream exporter slowdowns (such as metric stores or trace indices) from propagating blocking backpressure upstream and starving primary ingestion receivers.
globs: **/otel-collector*.{yaml,yml}, **/collector/*.{yaml,yml}, **/telemetry/**/*.{yaml,yml}, deploy/**/otel*.{yaml,yml}
alwaysApply: true
verified_by: "agentrules.org"
license: "CC-BY-4.0"
source: "https://agentrules.org/rules/otel-connector-nonblocking-backpressure-standard"
---

# OpenTelemetry Collector Connector Pipeline Non-Blocking Backpressure Standard

> **Severity**: CRITICAL | **Category**: devops
> **Anti-Pattern Warning**: Unbuffered Connector Cascades Exporter Delays Into Upstream Receiver Deadlocks

## System Constraints
You are a Principal Software Architect enforcing production reliability across OpenTelemetry Collector topologies. Mandate strict backpressure isolation, bounded queues, and memory limiter protections on all connector-bridged pipelines.

## Strict Guidelines
- Engineers MUST ALWAYS place the 'memory_limiter' processor as the first processor in every pipeline (traces, metrics, and logs) connected via connectors.
- Engineers MUST NOT configure connector exports without a memory-bounded 'sending_queue' in downstream exporter definitions.
- Downstream pipelines fed by connectors SHOULD utilize decoupled batch processors with explicit 'timeout' and 'send_batch_max_size' parameters to decouple processing ticks.
- Services MUST configure exporter 'sending_queue' blocks with 'enabled: true', a non-zero bounded 'queue_size', and realistic consumer concurrency via 'num_consumers'.
- Components NEVER allow unbounded synchronous in-memory routing between traces and metrics pipelines that risk cascading deadlocks back to OTLP receivers.

## Bad vs Good Implementations
### Configuring Trace-to-Metric Spanmetrics Connector with Resilient Backpressure

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: If the prometheusremotewrite exporter experiences high latency or downtime, the absence of an isolated sending_queue and memory_limiter causes backpressure to propagate synchronously through the spanmetrics connector into the traces pipeline, deadlocking the OTLP trace receiver and dropping incoming ingress spans.
```yaml
# Anti-Pattern: Connector connects pipelines without memory bounds, queues, or circuit breakers
connectors:
  spanmetrics:
    histogram:
      explicit:
        buckets: [10ms, 100ms, 1s]

processors:
  batch:
    send_batch_size: 8192

pipelines:
  traces:
    receivers: [otlp]
    processors: [batch]
    exporters: [spanmetrics, otlp/traces]
  metrics/from_traces:
    receivers: [spanmetrics]
    processors: [batch]
    exporters: [prometheusremotewrite] # Hangs here freeze the entire traces pipeline!
```

#### Production Standard (Correct)
> **Standard**: The memory_limiter processor runs first to shed load safely under pressure. The downstream Prometheus exporter features a bounded sending_queue and managed retries, ensuring that metric export bottlenecks are isolated to the secondary pipeline and cannot starve or deadlock the upstream trace ingestion.
```yaml
# Invariant Guardrail: Isolated queues, explicit memory limiter, and bounded drop/retry policies
processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 75
    spike_limit_percentage: 20
  batch/metrics:
    send_batch_size: 4096
    timeout: 5s
    send_batch_max_size: 8192

connectors:
  spanmetrics:
    histogram:
      explicit:
        buckets: [10ms, 100ms, 1s]

exporters:
  prometheusremotewrite:
    endpoint: "http://prom:9090/api/v1/write"
    retry_on_failure:
      enabled: true
      initial_interval: 5s
      max_interval: 30s
      max_elapsed_time: 2m
    sending_queue:
      enabled: true
      num_consumers: 4
      queue_size: 5000

pipelines:
  traces:
    receivers: [otlp]
    processors: [memory_limiter, batch/traces]
    exporters: [spanmetrics, otlp/traces]
  metrics/from_traces:
    receivers: [spanmetrics]
    processors: [memory_limiter, batch/metrics]
    exporters: [prometheusremotewrite]
```

Recommended MCP Servers (mcp-serverlist.com)

Equip agent with system tools to verify code for this stack.

Recommended Agent Skills (askills.dev)

Ready-to-use executable skill functions tailored to this stack.

Architectural Specification & Invariant Rationale

Architectural Invariant Design: OpenTelemetry Collector Connector Pipeline Non-Blocking Backpressure Standard

OpenTelemetry Collector Connector Pipeline Non-Blocking Backpressure Standard defines an industrial-grade behavioral standard for devops engineering. Enforces asynchronous, memory-bounded queueing and explicit shedding configurations on OpenTelemetry Collector connectors linking telemetry pipelines. Prevents downstream exporter slowdowns (such as metric stores or trace indices) from propagating blocking backpressure upstream and starving primary ingestion receivers. 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: Unbuffered Connector Cascades Exporter Delays Into Upstream Receiver Deadlocks 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 DriftUnbuffered Connector Cascades Exporter Delays Into Upstream Receiver DeadlocksCritical
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 place the 'memory_limiter' processor as the first processor in every pipeline (traces, metrics, and logs) connected via connectors.

Engineers MUST ALWAYS place the 'memory_limiter' processor as the first processor in every pipeline (traces, metrics, and logs) connected via connectors.

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 configure connector exports without a memory-bounded 'sending_queue' in downstream exporter definitions.

Engineers MUST NOT configure connector exports without a memory-bounded 'sending_queue' in downstream exporter definitions.

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

Downstream pipelines fed by connectors SHOULD utilize decoupled batch processors with explicit 'timeout' and 'send_batch_max_size' parameters to decouple processing ticks.

Downstream pipelines fed by connectors SHOULD utilize decoupled batch processors with explicit 'timeout' and 'send_batch_max_size' parameters to decouple processing ticks.

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 configure exporter 'sending_queue' blocks with 'enabled

Services MUST configure exporter 'sending_queue' blocks with 'enabled: true', a non-zero bounded 'queue_size', and realistic consumer concurrency via 'num_consumers'.

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 allow unbounded synchronous in-memory routing between traces and metrics pipelines that risk cascading deadlocks back to OTLP receivers.

Components NEVER allow unbounded synchronous in-memory routing between traces and metrics pipelines that risk cascading deadlocks back to OTLP receivers.

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 Connector Pipeline Non-Blocking Backpressure Standard critical for AI coding assistants?

Enforces asynchronous, memory-bounded queueing and explicit shedding configurations on OpenTelemetry Collector connectors linking telemetry pipelines. Prevents downstream exporter slowdowns (such as metric stores or trace indices) from propagating blocking backpressure upstream and starving primary ingestion receivers. 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 (Unbuffered Connector Cascades Exporter Delays Into Upstream Receiver Deadlocks) 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