This specification is maintained by the AgentRules Working Group. Have enhancements or want to claim maintainership?Submit Specification →
devopscritical PriorityID: otel-collector-inode-checkpoint-atomicity

OpenTelemetry Collector Inode-Aware Checkpoint Atomicity Standard

Enforces persistent, inode-aware monotonic offset tracking within OpenTelemetry Collector filelog receivers deployed in containerized environments. Eliminates log dropouts, re-ingestion loops, and duplicate delivery spikes induced by rapid Kubernetes and CRI log rotations.

Prohibited Anti-Pattern: Filepath-Bound Volatile Ingestion Subject to Inode Collision and Offset Rewinds During Log Rotation

Export Ready-to-Drop Configuration

Select format below to copy code or download file directly.

---
description: OpenTelemetry Collector Inode-Aware Checkpoint Atomicity Standard - Enforces persistent, inode-aware monotonic offset tracking within OpenTelemetry Collector filelog receivers deployed in containerized environments. Eliminates log dropouts, re-ingestion loops, and duplicate delivery spikes induced by rapid Kubernetes and CRI log rotations.
globs: **/otel-collector*.{yaml,yml}, **/collector-config*.{yaml,yml}, **/k8s/**/*.{yaml,yml}, **/helm/**/*.{yaml,yml}
alwaysApply: true
verified_by: "agentrules.org"
license: "CC-BY-4.0"
source: "https://agentrules.org/rules/otel-collector-inode-checkpoint-atomicity"
---

# OpenTelemetry Collector Inode-Aware Checkpoint Atomicity Standard

> **Severity**: CRITICAL | **Category**: devops
> **Anti-Pattern Warning**: Filepath-Bound Volatile Ingestion Subject to Inode Collision and Offset Rewinds During Log Rotation

## System Constraints
You are a Principal Software Architect enforcing high-scale telemetry ingestion invariants. Mandate persistent, inode-based offset storage configurations on all OpenTelemetry Collector filelog receivers to ensure strict idempotency and zero-loss log streaming across Kubernetes log rotation cycles.

## Strict Guidelines
- Collectors MUST configure a persistent `file_storage` extension to anchor ingestion checkpoints across process restarts and pod evictions.
- Receivers utilizing `filelog` MUST reference the declared `file_storage` extension via the `storage` configuration key.
- Engineers MUST NEVER permit in-memory checkpointing (omitting `storage` or using ephemeral stores) for production DaemonSet container log ingestion.
- File identification MUST employ `device_and_inode` fingerprinting or robust first-bytes checksum strategies instead of filepath string matches to track rotated files monotonically.
- Kubernetes DaemonSet manifests MUST mount a host persistent path (e.g., `/var/lib/otelcol/storage`) to persist checkpoint state across collector container restarts.
- Rotated archive logs MUST be monitored using `poll_interval` settings tuned below runtime rotation intervals (default <= 200ms) with non-zero retention after rotation.

## Bad vs Good Implementations
### Inode-Aware Persistent Checkpointing vs In-Memory Filepath Binding

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: Omitting the persistent `file_storage` extension and inode fingerprint configuration causes collectors to maintain file-offset state in volatile heap memory, keyed only by path. When Kubernetes rotates log files (e.g., moving app.log to app.log.1), the receiver resets to offset 0 on the new file and drops late-written records in the rotated file or duplicates past logs upon pod restarts.
```yaml
# CRITICAL VIOLATION: Ephemeral memory tracking without inode fingerprinting
extensions:
  health_check: {}

receivers:
  filelog:
    include:
      - /var/log/pods/*/*/*.log
    start_at: beginning
    # Missing storage extension: offsets retained only in memory
    # Inodes are not fingerprinted; file rotations reset read pointers or drop tail lines

service:
  extensions: [health_check]
  pipelines:
    logs:
      receivers: [filelog]
      processors: []
      exporters: [otlp]
```

#### Production Standard (Correct)
> **Standard**: Declares the `file_storage` extension anchored to a durable path and links it explicitly into the `filelog` receiver. The `device_and_inode` fingerprinting strategy maintains monotonic read offsets anchored to storage filesystem identity rather than mutable directory paths, guaranteeing atomic resumption and zero loss under high-frequency log rotation.
```yaml
# COMPLIANT: Inode-keyed persistent file storage with durable host-mount checkpoints
extensions:
  file_storage/checkpoints:
    directory: /var/lib/otelcol/checkpoints
    timeout: 1s
    compaction:
      on_start: true
      directory: /tmp/compact

receivers:
  filelog:
    include:
      - /var/log/pods/*/*/*.log
    exclude:
      - /var/log/pods/opentelemetry_*/*/*.log
    start_at: beginning
    storage: file_storage/checkpoints
    poll_interval: 200ms
    fingerprint:
      strategy: device_and_inode
    retry_on_failure:
      enabled: true
      initial_interval: 1s
      max_interval: 10s

service:
  extensions: [file_storage/checkpoints]
  pipelines:
    logs:
      receivers: [filelog]
      processors: []
      exporters: [otlp]
```

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 Inode-Aware Checkpoint Atomicity Standard

OpenTelemetry Collector Inode-Aware Checkpoint Atomicity Standard defines an industrial-grade behavioral standard for devops engineering. Enforces persistent, inode-aware monotonic offset tracking within OpenTelemetry Collector filelog receivers deployed in containerized environments. Eliminates log dropouts, re-ingestion loops, and duplicate delivery spikes induced by rapid Kubernetes and CRI log rotations. 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: Filepath-Bound Volatile Ingestion Subject to Inode Collision and Offset Rewinds During Log Rotation 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 DriftFilepath-Bound Volatile Ingestion Subject to Inode Collision and Offset Rewinds During Log RotationCritical
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 configure a persistent `file_storage` extension to anchor ingestion checkpoints across process restarts and pod evictions.

Collectors MUST configure a persistent `file_storage` extension to anchor ingestion checkpoints across process restarts and pod evictions.

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

Receivers utilizing `filelog` MUST reference the declared `file_storage` extension via the `storage` configuration key.

Receivers utilizing `filelog` MUST reference the declared `file_storage` extension via the `storage` configuration key.

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 NEVER permit in-memory checkpointing (omitting `storage` or using ephemeral stores) for production DaemonSet container log ingestion.

Engineers MUST NEVER permit in-memory checkpointing (omitting `storage` or using ephemeral stores) for production DaemonSet container log ingestion.

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

File identification MUST employ `device_and_inode` fingerprinting or robust first-bytes checksum strategies instead of filepath string matches to track rotated files monotonically.

File identification MUST employ `device_and_inode` fingerprinting or robust first-bytes checksum strategies instead of filepath string matches to track rotated files monotonically.

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

Kubernetes DaemonSet manifests MUST mount a host persistent path (e.g., `/var/lib/otelcol/storage`) to persist checkpoint state across collector container restarts.

Kubernetes DaemonSet manifests MUST mount a host persistent path (e.g., `/var/lib/otelcol/storage`) to persist checkpoint state across collector container restarts.

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

Rotated archive logs MUST be monitored using `poll_interval` settings tuned below runtime rotation intervals (default <= 200ms) with non-zero retention after rotation.

Rotated archive logs MUST be monitored using `poll_interval` settings tuned below runtime rotation intervals (default <= 200ms) with non-zero retention after rotation.

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 Inode-Aware Checkpoint Atomicity Standard critical for AI coding assistants?

Enforces persistent, inode-aware monotonic offset tracking within OpenTelemetry Collector filelog receivers deployed in containerized environments. Eliminates log dropouts, re-ingestion loops, and duplicate delivery spikes induced by rapid Kubernetes and CRI log rotations. 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 (Filepath-Bound Volatile Ingestion Subject to Inode Collision and Offset Rewinds During Log Rotation) 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