The Simplest Way to Make Gerrit and Redash Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams pair gerrit and redash to turn raw code review records into clear charts. Gerrit holds patch data, while Redash queries that data to track review speed. Engineering leaders need to see how fast patches move from draft to merge. Gerrit tracks every commit, comment, and vote in its backend store. Redash reads those records and builds live boards for the whole team. This workflow spots review bottlenecks before they slow down your release schedule. How data and permissions flow between ger

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 gerrit and redash to turn raw code review records into clear charts. Gerrit holds patch data, while Redash queries that data to track review speed.

Engineering leaders need to see how fast patches move from draft to merge. Gerrit tracks every commit, comment, and vote in its backend store. Redash reads those records and builds live boards for the whole team. This workflow spots review bottlenecks before they slow down your release schedule.

How data and permissions flow between gerrit and redash

Gerrit stores review metadata in a relational database or a Git note tree. Redash needs a read path to that data source to run queries. Most teams export Gerrit events or use a read replica for reporting. This keeps heavy analytics queries away from the live code review system.

To link the two tools, an admin sets up a data source in Redash. That data source uses a dedicated user role to log in and read tables. Redash runs scheduled queries to pull patch states, reviewer votes, and merge times. Users then log in to Redash to view dashboards based on their group permissions.

Permissions do not carry over between the two apps on their own. A private repo in Gerrit becomes visible if Redash queries it with broad rights. You must align Redash data source groups with your Gerrit project rules.

Common failure modes and how to scope roles

The biggest risk in this setup is a shared database account with high rights. If Redash uses an admin role, any chart builder can read private tables. Worse, a user with query access might run a write command by mistake. Long-lived passwords stored in Redash settings also create a high risk for leaks.

Unlogged queries cause another major issue for security and audit teams. When ten developers share one Redash data source, the database sees one user. You cannot tell which person ran a heavy or sensitive query. Sensitive fields like emails or phone numbers can also show up in raw results. Data masking rewrites matched fields in results so analysts only use safe metrics.

End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

To fix this, create a strict read-only database role just for Redash. Grant that role permission to select only the views needed for review metrics. Block access to user account tables, auth tokens, and private project rows. Point Redash at a read replica on a restricted network segment. Set query timeouts on the database side so bad joins do not freeze Gerrit.

Keeping query workflows fast and safe

Good analytics should not put your source code metadata at risk. Review your Redash groups every quarter to check who can write raw SQL. Give most team members view-only rights to finished dashboards instead of the query editor. Rotate the database key that Redash uses on a set schedule.

When you scope network paths and roles well, both tools run at peak speed. Developers get clear charts on review queues, and admins keep full control over data.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Should Redash query the primary Gerrit database directly?

No, you should point Redash at a read replica or an event store. This stops heavy report queries from slowing down live code reviews and merges.

How do we restrict sensitive Gerrit fields in Redash queries?

Give Redash a read-only database role scoped to specific reporting views. You can also use data masking to rewrite emails and phone numbers in results.

How do we match Gerrit project access in Redash?

Create separate Redash data sources and groups for different project tiers. Map each group to a database role that only reads allowed project rows.

The query runs. The emails stay hidden.