Module debug

Module debug 

Source
Expand description

§Debug Service

Provides a diagnostic stage that passes data through unchanged while emitting metrics to Prometheus for real-time monitoring and debugging.

§Purpose

Debug stages are useful for:

  • Detecting Data Corruption: Calculate checksums at intermediate points
  • Performance Analysis: Measure throughput between stages
  • Pipeline Debugging: Monitor data flow through complex pipelines
  • Production Monitoring: Real-time visibility into processing

§Metrics Exposed

Each DebugStage emits to Prometheus:

  • debug_stage_checksum{label, chunk_id} - SHA256 of chunk data
  • debug_stage_bytes{label, chunk_id} - Bytes processed per chunk
  • debug_stage_chunks_total{label} - Total chunks processed

§Label Uniqueness

Each DebugStage is automatically assigned a ULID label during creation, ensuring no metric name conflicts when multiple debug stages exist in a pipeline.

§Usage

# Create pipeline with debug stages at key points
pipeline create --name test --stages base64,debug,brotli,debug,encryption

# Monitor via Prometheus
curl http://localhost:9091/metrics | grep debug_stage

Structs§

DebugConfig
Configuration for Debug stage
DebugService
Service that passes data through while emitting Prometheus metrics