Schedule icon
Request icon
Script icon
OutputValues icon
If icon
SlackIncomingWebhook icon
Fail icon
Log icon

Watch OpenTelemetry Collector Queue Pressure and Failed Enqueues

Detect OpenTelemetry Collector exporter queue pressure and failed enqueues with Prometheus and Kestra.

Categories
CloudInfrastructure

Sending queues can fill during backend outages and cause failed enqueue operations. This workflow measures exporter queue use and failed enqueue counters. It blocks on pressure, missing telemetry, or invalid responses.

How it works

  1. Three HTTP tasks call the Prometheus instant-query API for exporter queue size, capacity, and increases in failed enqueue counters.
  2. assess_exporters joins series on job, instance, exporter, and service_instance_id. It rejects mismatches, stale/invalid metrics, absent queues, and counters missing for a queue.
  3. It computes each queue occupancy as size/capacity and checks the ten-minute failed-enqueue increase. Results go into JSON evidence.
  4. pressure_gate alerts Slack and fails on BLOCK. A healthy check logs PASS only if every returned exporter is accounted for.

What you get

  • A list of exporter queue utilization and failed enqueue observations.
  • Fail-closed handling of gaps between size, capacity, and failure series.
  • A downloadable report and Slack alert on a blocked gate.
  • A disabled ten-minute schedule.

Who it's for

  • SRE and observability teams operating OpenTelemetry Collectors.
  • Platform teams investigating delayed exports and telemetry gaps.

Why orchestrate this with Kestra

Connect telemetry queries to clear branching, persistent reports, and incident workflows without writing a separate alert dispatcher.

Prerequisites

  • A Prometheus endpoint that scrapes Collector internal telemetry at basic level or higher, including queue size/capacity and enqueue failure counters. Sending queues must be enabled on audited exporters.
  • A Kestra worker able to run the Node scripts plugin.
  • Read access from Kestra to the Prometheus HTTP API.

Secrets

  • SLACK_WEBHOOK_URL: Slack incoming webhook for a blocked gate.
  • Prometheus must be accessible without authentication in this example; place it behind trusted networking or adapt the HTTP headers.

Quick start

  1. Configure prometheus_url and the SLACK_WEBHOOK_URL secret.
  2. In Prometheus, confirm queue_size, queue_capacity, and failed-enqueue counters exist for each audited exporter; no data means BLOCK.
  3. Run the flow manually with threshold 0.8. Check report_location.
  4. Test the BLOCK path with a lower occupancy threshold and review the alert. Restore it before enabling the schedule.
  5. Enable the disabled schedule only after both paths are verified.

How to extend

  • Send BLOCK to incident triage and pause noncritical data pipelines.
  • Compare trends from stored reports before changing collector scaling.
  • Add label scoping for very large or multi-tenant Prometheus instances.

Limits

  • Checks only exporters that expose queue metrics, not every Collector. If no queues are present, the flow blocks instead of saying PASS.
  • A failed enqueue is a possible data-loss signal. Failed sends may be retried and are not, by themselves, confirmed permanent data loss.
  • Sums failed spans, metric points, and log records as item counts. These unit types differ; treat the sum as an operational signal.
  • The 10-minute query is fixed and may require two scrape samples. Missing series block instead of inferring zero.
  • Multiple instant Prometheus queries do not form an atomic snapshot.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.