Lab 04 — Grafana Datasource Configuration
Objective
Configure and verify all three xScaler datasources in Grafana, including cross-signal correlation.
Prerequisites
- Lab 01 completed (
PROD_TENANTandPROD_API_KEYexported) - Grafana accessible:
https://<slug>.g.xscalerlabs.com - Training environment running
Architecture
Steps
Step 1 — Verify Pre-Provisioned Datasources
- Open
https://<slug>.g.xscalerlabs.com(admin/admin) - Navigate to Connections → Data Sources
- Verify four datasources exist:
platform-metrics,xMetrics,xLogs,tempo - Click Test on each — all should show green
Step 2 — Verify Metrics Datasource
# Direct query to confirm data exists
curl -s "https://<edge>.m.xscalerlabs.com/prometheus/api/v1/query" \
-H "X-Scope-OrgID: <your-tenant-id>" \
--data-urlencode 'query=up' | jq '.data.result | length'
# Expected: > 0
Step 3 — Verify Logs Datasource
In Grafana Explore → xLogs datasource:
{service=~".+"}
Expected: Log streams from the loadgen service.
Step 4 — Verify Traces Datasource
In Grafana Explore → xTraces datasource → Search → Run Query.
Expected: Recent traces from loadgen.
Step 5 — Test Cross-Signal Correlation
- In xTraces Explore, click any trace
- Click Logs for this span
- Verify xLogs log lines appear
[Screenshot: xTraces trace detail with side panel showing correlated xLogs log lines]
Validation
- All four datasources show green status
- PromQL
upreturns results - LogQL
{service=~".+"}returns log streams - xTraces search returns traces
- Trace-to-logs correlation works
Troubleshooting
xTraces shows 'no traces'
docker compose logs loadgen --tail=20
docker compose ps loadgen
← Previous: Lab 03
Next: Lab 05 — Dashboard Creation →