Part of #5365.
Context: browserless (the headless-Chromium visual-review screenshot capture service, --profile visual-review) exposes a /metrics?token=<BROWSERLESS_TOKEN> endpoint, confirmed live — but it returns JSON ([{"error":0,"maxConcurrent":...,"queued":0,"running":0,"successful":1,"cpu":...,"memory":...,...}]), not Prometheus text format, so Prometheus can't scrape it directly.
Requirements:
- Add a small translator sidecar (or a lightweight script-based service) that polls browserless's JSON
/metrics endpoint and re-exposes the same data as real Prometheus text (# HELP/# TYPE + metric lines) on its own port.
- Mirror the existing
backup-exporter pattern already in this repo — described in prometheus/prometheus.yml's own comment as "a tiny BusyBox httpd wrapper around Prometheus text output" — rather than inventing a new architecture. Check scripts/ for the backup-exporter's actual implementation as the concrete template.
- Map the meaningful fields from browserless's JSON shape to real metrics: queue depth (
queued), concurrency (running/maxConcurrent), rejection/timeout/error counts, and per-session CPU/memory if worth exposing as a gauge.
- Add the new sidecar to
docker-compose.yml, --profile visual-review-gated (matching browserless's own profile), with deploy.resources.limits.memory and .env.example documentation per the established pattern.
- Add a
prometheus.yml scrape target for it.
- Add panels to a relevant dashboard (queue depth, concurrency, rejection rate are the most actionable — a self-hoster capturing a lot of visual-review screenshots needs to know if browserless itself is the bottleneck).
- Full test coverage for the new sidecar + scrape config + dashboard.
Deliverables:
- New translator sidecar service (script + Docker service definition).
prometheus.yml scrape target.
- Dashboard panel(s) for browserless queue/concurrency/rejection signal.
- Tests.
Expected outcomes: A self-hoster running visual-review PR screenshot capture can see, in Grafana, whether browserless itself is queuing/rejecting/erroring — instead of only noticing when screenshot capture silently stops working.
Links/resources:
- browserless's JSON
/metrics shape confirmed live on 2026-07-12 (see this issue's context above for the actual field names returned).
- The existing
backup-exporter service in docker-compose.yml + its script under scripts/ as the concrete "translate non-Prometheus output into Prometheus text" template already proven in this repo.
Part of #5365.
Context:
browserless(the headless-Chromium visual-review screenshot capture service,--profile visual-review) exposes a/metrics?token=<BROWSERLESS_TOKEN>endpoint, confirmed live — but it returns JSON ([{"error":0,"maxConcurrent":...,"queued":0,"running":0,"successful":1,"cpu":...,"memory":...,...}]), not Prometheus text format, so Prometheus can't scrape it directly.Requirements:
/metricsendpoint and re-exposes the same data as real Prometheus text (# HELP/# TYPE+ metric lines) on its own port.backup-exporterpattern already in this repo — described inprometheus/prometheus.yml's own comment as "a tiny BusyBox httpd wrapper around Prometheus text output" — rather than inventing a new architecture. Checkscripts/for the backup-exporter's actual implementation as the concrete template.queued), concurrency (running/maxConcurrent), rejection/timeout/error counts, and per-session CPU/memory if worth exposing as a gauge.docker-compose.yml,--profile visual-review-gated (matching browserless's own profile), withdeploy.resources.limits.memoryand.env.exampledocumentation per the established pattern.prometheus.ymlscrape target for it.Deliverables:
prometheus.ymlscrape target.Expected outcomes: A self-hoster running visual-review PR screenshot capture can see, in Grafana, whether browserless itself is queuing/rejecting/erroring — instead of only noticing when screenshot capture silently stops working.
Links/resources:
/metricsshape confirmed live on 2026-07-12 (see this issue's context above for the actual field names returned).backup-exporterservice indocker-compose.yml+ its script underscripts/as the concrete "translate non-Prometheus output into Prometheus text" template already proven in this repo.