Skip to main content

Lab 04 — Grafana Datasource Configuration

Objective

Configure and verify all three xScaler datasources in Grafana, including cross-signal correlation.

Prerequisites

  • Lab 01 completed (PROD_TENANT and PROD_API_KEY exported)
  • Grafana accessible: https://<slug>.g.xscalerlabs.com
  • Training environment running

Architecture

Steps

Step 1 — Verify Pre-Provisioned Datasources

  1. Open https://<slug>.g.xscalerlabs.com (admin/admin)
  2. Navigate to Connections → Data Sources
  3. Verify four datasources exist: platform-metrics, xMetrics, xLogs, tempo
  4. 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

  1. In xTraces Explore, click any trace
  2. Click Logs for this span
  3. 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 up returns 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 →