Get Prometheus metrics for a merge queue
Returns Prometheus metrics for one merge queue, in the text exposition format, for a Prometheus scrape job. The series and labels are those of GET /v2/merge-queues/metrics, restricted to this queue.
Authorizations
An API key, sent as Authorization: Bearer <key>. An organization admin creates one in the Trunk app under Settings → Developer → API Keys and chooses the merge-queue permissions it holds; a key with none can read merge queues but change nothing. Those permissions scope merge queue only: every key can use the Flaky Tests and Dynamic CI endpoints, including their writes, whatever permissions it holds.
Path Parameters
The merge queue's id.
"xK9mP2nQ"
Response
The merge queue's metrics
Prometheus text exposition format 0.0.4. The metric names, help text and labels are v1's getMergeQueueMetrics, so an existing scrape config or dashboard needs only its URL and credential changed. Every series carries repo (the repository's name), branch and queue_type (main or bisection); mq_pr_conclusions_1h_total and mq_pr_time_in_queue_1h_seconds* add conclusion, and mq_pr_state_duration_1h_seconds* adds state. Gauges report the queue now; _1h series cover the last hour.
"# HELP mq_depth_current Number of PRs currently in the queue (in any non-terminal state).\n# TYPE mq_depth_current gauge\nmq_depth_current{repo=\"acme/widgets\",branch=\"main\",queue_type=\"main\"} 4\n"