Skip to content

Metrics

GET /metrics on the API’s host answers in the Prometheus text format. It is off, and answers 404, until FIBER_METRICS_TOKEN is set as a secret of the API Worker; then it wants that token as Authorization: Bearer <token>. One reading is kept for 10 s in each isolate, whoever asks.

scrape_configs:
- job_name: fiber
scheme: https
authorization: { credentials_file: /etc/prometheus/fiber-token }
static_configs: [{ targets: [ci.example.com] }]
Family Type What
fiber_build_info{version} gauge The id of the API Worker’s version that answered.
fiber_runs{status} gauge Runs that are not over: pending, running.
fiber_step_runs{status} gauge Step runs waiting for an agent, queued, or held by one, running.
fiber_fibers{status} gauge Durable tasks that are not over: pending, running, suspended.
fiber_agents{state} gauge Registered agents, online or offline.
fiber_oldest_queued_step_age_seconds gauge How long the oldest step that could be given out now has waited; 0 when none. A step waiting out a retry’s backoff is not counted.
fiber_step_queue_wait_seconds histogram How long each attempt waited to be given out, over the last 24 hours.
fiber_step_duration_seconds histogram How long each attempt ran, over the last 24 hours.
fiber_metrics_timings_up gauge 1 when the two histograms could be read; 0, and they are left out, when not.

Buckets are 1, 2.5, 5, 10, 30, 60, 120, 300, 600, 1800 and 3600 seconds.

  • Runs, step runs and tasks that are over are not counted: how many ended, and how, is in the histograms and in the run list. Counting every row on each scrape would read the whole database each time.
  • The histograms come from Workers Analytics Engine. The engine writes a data point when an attempt is given out and when it ends, to the dataset fiber_metrics; the API reads it with an Analytics SQL binding, without an API token. Analytics Engine samples, even at low volume, and the query weighs what it kept, so these are estimates; a point written by an object that is stopped first is lost. Checked on Cloudflare on 1 Dec 2026: of six points written, three were kept with a weight of 2, and the query’s counts, sum and buckets came out as those three, doubled. To use another dataset, change the engine’s analytics_engine_datasets and set the API’s FIBER_METRICS_DATASET to the same name.
  • A point holds the project’s id, the kind, how the attempt ended and the seconds; nothing else. The same dataset has a reading of the queue each minute, for alerts; /metrics leaves it out.