Bridge
The Bridge is a Python-based service that provides the core log processing pipeline. It consumes raw OTLP JSON from Kafka, normalizes it into flat documents, detects anomalies, correlates traces, and indexes everything into OpenSearch.Architecture
The Bridge runs 4 concurrent threads, each handling a distinct stage of the pipeline:OTLP ETL (Thread 1)
The ETL thread consumes OTLP JSON messages from theraw-logs Kafka topic and flattens them into canonical log documents.
OTLP unwrapping path:
Anomaly Detection (Thread 2)
Uses a signal-based composite scoring system to classify whether an error log is incident-worthy. Not every error triggers an incident — the system distinguishes actionable failures (OOM, database deadlocks, cascading failures) from noise (validation errors, 404s). Two detection paths run in parallel:- Immediate path — OOM, crash, and resource exhaustion patterns fire in under 1 second without waiting for a time window
- Windowed path — statistical z-score combined with blast radius, velocity, and recurrence signals across the sliding window
When an anomaly is detected, an event is published to
anomaly-events Kafka topic with anomaly_score, severity, signals, detection_mode, error_category, and error_message fields.
Request Lifecycle Engine (Thread 4)
The lifecycle engine performs 5-layer trace correlation to group related log entries into request timelines:- Trace ID grouping — group logs sharing the same
trace_id - Temporal proximity — cluster logs within a time window
- Service dependency mapping — map caller→callee relationships
- Error propagation tracking — trace error cascades across services
- Blast radius computation — determine affected services and endpoints
Prometheus Metrics
The Bridge exposes Prometheus-format metrics atGET /metrics:
Configuration
Environment Variables
Runtime Configuration
The Bridge supports dynamic runtime configuration via the/config endpoint: