Get Prometheus metrics for every merge queue
Returns Prometheus metrics for every merge queue in your organization, in the text exposition format, for a Prometheus scrape job. repositoryId narrows them to one repository’s queues, across all its target branches, and is a 404 when your organization has no such repository. The metrics match v1’s getMergeQueueMetrics.
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.
Query Parameters
Only this repository's queues.
"7c9e6679-7425-40de-944b-e07fc1f90ae7"
Response
The organization's merge-queue 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"