Script icon
If icon
SlackIncomingWebhook icon
Log icon
Return icon
Schedule icon

Jaeger Trace Spans Dropped and Storage Error Sentinel

Audits Jaeger distributed tracing collectors for dropped spans, internal queue pressure, and storage write errors with automated alerting.

Categories
CloudInfrastructure

Audits Jaeger distributed tracing collector metrics endpoints to detect dropped span telemetry, monitor internal memory queues, and catch storage write failures.

How it works

  1. The hourly_jaeger_audit schedule trigger executes once per hour on a recurring schedule.
  2. The audit_jaeger_collector Python task scrapes the Jaeger collector Prometheus endpoint on port 14269, parsing dropped spans and backend save errors.
  3. The check_jaeger_health flowable checks if dropped spans exceeded limits or if the storage backend rejected writes.
  4. If degradation is detected, notify_slack_tracing_ops delivers an incident alert to the Tracing Operations Slack channel.
  5. If all spans are ingested and committed to storage without loss, log_healthy_jaeger logs nominal status.
  6. The export_jaeger_manifest task records an execution summary payload.

Architecture diagram

flowchart TD
    T[Schedule: hourly_jaeger_audit] --> S[audit_jaeger_collector]
    S --> C{check_jaeger_health}
    C -- Degraded --> A[notify_slack_tracing_ops]
    C -- Healthy --> H[log_healthy_jaeger]
    A --> E[export_jaeger_manifest]
    H --> E[export_jaeger_manifest]

Use cases

  • Distributed Tracing Ingestion Shielding: Protects OpenTelemetry and Jaeger trace collection pipelines during unexpected microservice error storms.
  • Storage Backend Backpressure Detection: Flags when downstream Elasticsearch, OpenSearch, or Cassandra clusters throttle writes.
  • Observability Coverage Guarantee: Ensures critical transaction spans are retained rather than discarded due to internal collector queue capacity limits.

Inputs

Name Type Default Description
jaeger_metrics_url STRING http://jaeger-collector.internal:14269/metrics Prometheus metrics HTTP endpoint exposed by the Jaeger Collector component.
max_tolerated_dropped_spans INT 0 Maximum permissible spans dropped due to queue saturation before alerting.
alert_on_storage_errors BOOL true Whether to alert if Jaeger collector records errors writing spans to the storage backend.

Expected outputs

  • outputs.audit_jaeger_collector.vars.spans_received: Cumulative count of spans ingested by collector.
  • outputs.audit_jaeger_collector.vars.spans_dropped: Total spans discarded due to queue overflow.
  • outputs.audit_jaeger_collector.vars.save_errors: Number of storage write failure events.
  • outputs.audit_jaeger_collector.vars.degraded: Boolean flag indicating trace loss.
  • outputs.export_jaeger_manifest.value: Formatted execution report summary.

Prerequisites

  • Network connectivity from Kestra workers to the Jaeger Collector metrics port (typically 14269).
  • Jaeger Collector deployed with admin HTTP port enabled.
  • Slack incoming webhook endpoint configured.

Secrets

  • SLACK_WEBHOOK_URL: Secret containing the Slack incoming webhook endpoint for channel alerts.

Quick start

  1. Define SLACK_WEBHOOK_URL in your Kestra namespace secrets.
  2. Adjust jaeger_metrics_url to match your Jaeger Collector admin address.
  3. Run a manual execution to test metrics scraping and verify parsed span statistics.
  4. Enable the hourly_jaeger_audit schedule to automate continuous cluster surveillance.

Common pitfalls and troubleshooting

  • Metrics Port vs Collector Port: Port 14268/14250 handles span ingestion, while port 14269 serves admin endpoints including /metrics.
  • Internal Queue Sizing: When spans drop, increase --collector.queue-size or --collector.num-workers to expand buffering capacity during transient spikes.
  • Storage Backend Health: Check Elasticsearch index health and thread pool write rejections if save_errors increase.

How to extend

  • Automate Jaeger collector replica scaling via Kubernetes plugins when queue length nears capacity.
  • Correlate span drop spikes with upstream OpenTelemetry Collector exporter queue metrics.
  • Dispatch PagerDuty incident tickets for sustained storage write failure events.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.