Skip to content

Telemetry

Telemetry signal flow

Telemetry - объединенная runtime signal surface: metrics, logs, health checks, The Deck notifications и durable dashboard aggregates.

ChokaQ разделяет telemetry по назначению. Metrics нужны для trends и alerting. Logs - для event evidence. Health checks - для infrastructure decisions. The Deck - для live operator workflow. SQL state остается source of truth.

Signal types

SignalPurpose
OpenTelemetry metricsAlerting, dashboards, autoscaling, SLOs.
Structured logsDebugging and incident timelines.
Health checksLoad balancer and infrastructure health.
SignalR notificationsReal-time operator updates in The Deck.
MetricBucketsDurable recent throughput/failure aggregates.
SQL tablesAuthoritative job state.

Important events

Runtime логирует worker lifecycle, retry scheduling, DLQ moves, heartbeat failures, circuit breaker events, zombie rescue, state-transition conflicts и prefetched-job release problems.

Эти events должны быть searchable по job ID, queue, job type и worker ID, где они доступны.

Health vs metrics

Health checks отвечают: "Должна ли infrastructure считать этот host healthy?"

Metrics отвечают: "Что меняется со временем?"

Host может быть технически healthy, пока queue lag растет. Поэтому production operations должны alert'ить по lag и failure-rate metrics, а не только по HTTP health status.

Архитектурное решение

Почему этот pattern?

Одной telemetry surface недостаточно. Background job systems нужны и machine-readable signals, и operator-readable state.

Trade-offs

Больше signals означает больше documentation и alert design. Выигрыш - ниже incident ambiguity: operators видят, проблема в queue lag, SQL connectivity, handler failures, heartbeat failures или circuit protection.

Рассмотренные альтернативы

AlternativeBenefitCost
Logs onlyЛегко emit'ить.Сложно alert'ить и точно aggregate'ить.
Metrics onlyХорошо для SLOs.Слабее payload/state investigation.
Dashboard onlyOperator friendly.Нужны metrics или logs для automated alerting.

Дополнительные вопросы

Что является source of truth?
SQL storage authoritative для job state. Metrics и SignalR - derived signals.

Какой первый saturation signal?
Queue lag, потому что он измеряет, как долго eligible work ждет.

Зачем MetricBuckets, если есть OpenTelemetry?
The Deck нужны быстрые local rolling windows из durable state без зависимости от external metrics backend.

Лицензия Apache 2.0