The Simplest Way to Make Phabricator and Prometheus Work Like They Should
Teams pair phabricator and prometheus to track code review speed and server health in production. This setup pulls task metrics from your code host into a central time-series database. Phabricator runs code reviews, git hosting, and task tracking for software teams. Prometheus scrapes numeric metrics from targets on a fixed timer. When you link them, you can see how daemon queues affect developer wait times. You also catch database slowdowns before engineers notice broken diffs or stalled build
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Teams pair phabricator and prometheus to track code review speed and server health in production. This setup pulls task metrics from your code host into a central time-series database.
Phabricator runs code reviews, git hosting, and task tracking for software teams. Prometheus scrapes numeric metrics from targets on a fixed timer. When you link them, you can see how daemon queues affect developer wait times. You also catch database slowdowns before engineers notice broken diffs or stalled builds.
How phabricator and prometheus share data and permissions
Prometheus uses a pull model to read metrics over HTTP from target endpoints. Phabricator does not expose a native metrics format out of the box. To bridge this gap, teams run a small metric exporter beside the app server. This exporter queries the app API or reads local status tables on a schedule.
To log in, the exporter uses a bot account with an API token. That token lets the collector read queue lengths, open tasks, and daemon heartbeats. Next, the exporter translates those numbers into plain text series on a local port. Prometheus scrapes that port every few seconds and stores the values on disk.
Permissions flow in one direction during this whole process. The metric server only needs read rights on specific status endpoints. It never needs permission to write code, close tasks, or change user roles. Keeping this path read-only protects your source code if the monitoring server gets compromised.
Common failure modes and how to scope roles
The biggest mistake teams make is using an admin key for metric collection. An admin key can read private repos and edit system rules. If that key leaks in a plain text file, attackers gain full control. Instead, create a dedicated bot user with the smallest possible read scope.
Another common issue comes from direct database queries for metric collection. Some teams point a database exporter right at the backend storage tables. Heavy metric queries can lock rows and slow down active code reviews. If you query storage directly, use a read replica and set strict query timeouts.
End-to-End Encryption + Prometheus Security: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Unlogged queries also create blind spots for security teams during an audit. When five scripts share one static token, you cannot tell which script caused a spike. Give each collector its own account and rotate those keys on a regular schedule. You should also restrict network paths using strict firewall rules.
Only the metric collector should reach the exporter port on the app host. Developers and external networks do not need direct network paths to raw metric endpoints. Scoping both network rules and account roles keeps your setup fast and safe.
Alerting on daemon queues and review latency
Once data flows cleanly, you can build alerts that matter to engineers. Start by watching the background task queue depth over five-minute windows. A sudden rise in leased or waiting tasks means background workers have stalled. You can also track HTTP response times for diff views and git clones.
Route high-priority alerts to the on-call team when workers stop processing jobs. Send slower trends, like rising review wait times, to a daily team dashboard. This separation prevents alert fatigue while keeping your core development tools fast and reliable.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.
Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.
Frequently asked questions
How does Prometheus read data from Phabricator?
Teams run a sidecar exporter that queries the app API or status tables. The exporter converts those stats into a metrics format that Prometheus scrapes over HTTP.
What permissions should the monitoring bot account have?
Give the bot account read-only access to public metadata and daemon status endpoints. Never grant write access or admin rights to a metric collection account.
Which Phabricator metrics matter most for production stability?
Track background daemon queue depth, task lease failures, and web request latency. These three signals tell you right away when code reviews or git hooks stall.
Related guides
In this post