| name | testing |
| license | Apache-2.0 |
| description | Probe, load-test, and instrument frontends from Grafana Cloud. Covers Synthetic Monitoring (HTTP / DNS / TCP / Ping / Traceroute / Multihttp / k6-browser scripted checks from 20+ global probes, alert on `probe_success` + TLS-cert expiry), Grafana Cloud k6 (distributed load tests across AWS load-zones, scenarios, `http_req_duration` thresholds, CI integration via `grafana/k6-action`), and Frontend Observability with Faro Web SDK (RUM, Core Web Vitals, custom events, `pushError`, distributed-trace correlation). Use when checking website / API uptime from multiple regions, gating a release on a load test, watching for TLS-cert renewal, instrumenting a React/Vue app, tracking Core Web Vitals, or correlating frontend errors to backend traces — even when the user says "is my login flow up?", "monitor my API", "ping our endpoint every minute", "release-gate load test", "browser performance monitoring", "session replay", or "RUM" without naming Synthetic Monitoring / k6 / Faro. |
Grafana Cloud Testing
Docs: https://grafana.com/docs/grafana-cloud/testing/
Three pillars: external probing (Synthetic Monitoring), load testing (k6 Cloud), real-user monitoring (Faro).
Prerequisites
- Grafana Cloud stack
- Synthetic Monitoring: SM access token (
sm:write)
- k6 Cloud: a Grafana Cloud k6 token + projectID
- Faro: a Faro app + write-token from Frontend Observability → Apps
Common Workflows
1. Create + verify a Synthetic HTTP check
curl -X POST https://synthetic-monitoring-api.grafana.net/sm/checks \
-H "Authorization: Bearer <sm-token>" -H "Content-Type: application/json" \
-d '{"job":"website","target":"https://example.com","frequency":60000,"timeout":15000,
"enabled":true,"probes":[1,5,10],
"settings":{"http":{"method":"GET","validStatusCodes":[200]}}}'
curl -s https://synthetic-monitoring-api.grafana.net/sm/checks \
-H "Authorization: Bearer <sm-token>" | jq '.[] | select(.job=="website")'
See references/synthetic.md for all check types, PromQL queries, and alert rules.
2. Run a k6 cloud load test
k6 cloud login --token <grafana-cloud-k6-token>
k6 run --vus 1 --duration 30s script.js
k6 cloud script.js
echo $?
Full script + scenarios + CI YAML: references/k6-and-faro.md.
3. Instrument a frontend with Faro
npm install @grafana/faro-web-sdk @grafana/faro-web-tracing
faro.api.pushEvent('faro_smoketest', { ts: Date.now().toString() });
Troubleshooting
- Synthetic check stuck at
probe_success=0 → check probe_*_duration_seconds for the failing stage; the probe-region label tells you which prober errored
- k6 cloud run "ABORTED_THRESHOLD" → a threshold tripped; inspect the run page to see which one
- Faro events not landing → check the browser network call to
/collect returns 202; common cause is wrong apiKey or url (must match the FE Observability app)
References
Resources