This guide shows you how to connect Leapwork Performance to Grafana Cloud so you can visualize performance test metrics in Grafana dashboards.
Use it when you want to monitor latency, throughput, and error rates across runs.
Before you begin
Make sure you have:
-
A Grafana Cloud account with a Graphite stack
-
A Grafana Cloud access policy token with
metrics:writepermission -
A Leapwork Performance company with access to Settings → App Monitoring
-
At least one completed run in Leapwork Performance (for validation)
Note: Leapwork Performance currently supports Grafana integrations only when using the Graphite data source.
Create a Grafana access policy and token
-
Open Administration → Users and access → Cloud access policies in Grafana Cloud.
-
Select Create access policy.
-
Enter a descriptive name, such as
Leapwork Performance metrics publish. -
Add at least
metrics:write. Optionally, addmetrics:read. -
Save the policy.
-
Under the new policy, select Add token.
-
Copy the full token immediately. You cannot view it again.
Note: If you create a token under a predefined read-only policy, it will not include
metrics:write. Leapwork Performance requiresmetrics:writeto publish data.
Find the Graphite connection details
In your Grafana Cloud stack details or the Graphite setup page, locate these values:
|
Detail |
Example |
|---|---|
|
Graphite datasource URL |
|
|
Graphite ingest URL |
|
|
Graphite username / instance ID |
|
Note: The datasource URL ends with
/graphite. Leapwork Performance must use the ingest endpoint, which ends with/graphite/metrics.
Add the Grafana connection in Leapwork Performance
-
Open Settings → App Monitoring in Leapwork Performance.
-
Select the Grafana provider tile.
-
Enter the connection details using the values from the previous section.
-
Save the connection.
Recommended field values:
|
Field |
Value |
|---|---|
|
Provider |
|
|
Connection name |
|
|
Graphite ingest URL |
|
|
Graphite username |
Your Graphite instance ID |
|
Access token |
Your Grafana Cloud token |
|
Metric namespace |
|
|
Default tags |
Optional. For example, |
|
Enable automatic publishing |
|
Example stored configuration:
{
"endpoint": "https://graphite-prod-43-prod-ap-south-1.grafana.net/graphite/metrics",
"username": "3140687",
"apiKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"defaultTags": ["env:prod", "team:perf"],
"metricNamespace": "lp.run_results"
}
Understand how publishing works
Leapwork Performance publishes data to Grafana automatically when a run reaches a terminal state: Finished, Stopped, or Failed.
The backend checks whether the company has an enabled Grafana connection. If it does, Leapwork Performance sends Graphite metric points to the configured ingest endpoint.
Example endpoint:
https://graphite-prod-43-prod-ap-south-1.grafana.net/graphite/metrics
For large payloads, Leapwork Performance publishes in batches:
-
Each batch contains up to 500 metric points.
-
Each batch includes retry handling.
-
Success and failure are logged per batch.
Metric catalog
Leapwork Performance publishes the following metric groups.
Per-step terminal metrics
These metrics are emitted for each step in each selected track item after the run completes.
|
Metric |
Description |
|---|---|
|
|
Total requests sent for the step |
|
|
Total failed requests for the step |
|
|
Total request body bytes sent |
|
|
Total response bytes received |
|
|
Minimum latency in milliseconds |
|
|
Average latency in milliseconds |
|
|
Median latency in milliseconds |
|
|
P90 latency in milliseconds |
|
|
P95 latency in milliseconds |
|
|
P99 latency in milliseconds |
|
|
Maximum latency in milliseconds |
Run-level summary metrics
These metrics are emitted once per run from weighted summary data.
|
Metric |
Description |
|---|---|
|
|
Weighted run-wide average latency |
|
|
Weighted run-wide P90 latency |
|
|
Weighted run-wide P95 latency |
|
|
Weighted run-wide P99 latency |
|
|
Peak throughput for the run |
|
|
Run-wide error rate percentage |
|
|
Run duration in seconds |
|
|
Peak virtual users for the run |
Track-item summary metrics
These metrics are emitted from aggregated track-item statistics.
|
Metric |
Description |
|---|---|
|
|
Total sequences completed |
|
|
Throughput for the run or track item |
|
|
Current virtual users |
|
|
Number of alive agents |
|
|
Sequences still running |
|
|
Virtual User Minutes (VUM) consumed |
Historical timeseries metrics
These metrics are emitted from historical run_data graph points. Use them to visualize a run over time in Grafana.
|
Metric |
Description |
|---|---|
|
|
Requests over time for a track item |
|
|
Average latency over time for a track item |
Status-code breakdown metrics
These metrics are emitted from aggregated step status-code counts.
|
Metric |
Description |
|---|---|
|
|
Count of responses for a specific HTTP status code |
Tags added to metrics
Leapwork Performance attaches Graphite tags to metrics so you can filter, group, and build dashboards.
Base tags
These tags appear on most or all published metrics.
|
Tag |
Description |
|---|---|
|
|
Leapwork Performance run ID |
|
|
Terminal run status |
|
|
Leapwork Performance company ID |
|
|
Company name |
|
|
Project ID |
|
|
Project name |
|
|
Timeline asset ID |
|
|
Timeline title |
|
|
Timeline name plus UTC timestamp |
Step-level tags
These tags appear on per-step metrics.
|
Tag |
Description |
|---|---|
|
|
Track item ID |
|
|
Step ID |
|
|
Step title |
|
|
Whether the track item was selected for the run |
Track-item and status-code tags
These tags appear where applicable.
|
Tag |
Description |
|---|---|
|
|
Track item geo location |
|
|
HTTP status code, such as |
Default tags
Any default tags you configure in the connection settings are also attached. For example:
-
env=prod -
team=perf
Example metric points
Per-step metric example
name: lp.run_results.latency.p95_ms
value: 821
time: 1713701900
tags:
run_id=r8_ynth
run_status=finished
company_id=v_smt_rpx
company_name=leapwork
project_id=abc123
project_name=new_project
timeline_asset_id=new_timeline
timeline_name=new_timeline
run_name=new_timeline_24042026083945
track_item_id=track1
step_id=step_login
step_title=login
track_item_selected=true
geo_location=northeurope
env=prod
team=perf
Run summary metric example
name: lp.run_results.run.peak_throughput
value: 642
time: 1713701900
tags:
run_id=r8_ynth
run_status=finished
company_id=v_smt_rpx
company_name=leapwork
project_id=abc123
project_name=new_project
timeline_asset_id=new_timeline
timeline_name=new_timeline
run_name=new_timeline_24042026083945
Status-code metric example
name: lp.run_results.status_code.count
value: 638
time: 1713701900
tags:
run_id=r8_ynth
run_status=finished
company_id=v_smt_rpx
project_id=abc123
timeline_name=new_timeline
track_item_id=track1
step_id=step_login
step_title=login
status_code=200
geo_location=northeurope
Validate that Leapwork Performance is publishing
Check Leapwork Performance logs
Look for these log entries in LeapworkPerformanceRunner:
Success:
-
Published Grafana batch ... -
Published ... Grafana metric points for run ... across ... batches
Failure:
-
Grafana publish failed with status ... -
Failed to publish run ... to Grafana
Check Grafana Explore
-
Open Explore in Grafana.
-
Select the Graphite data source (not Prometheus).
-
Run the following query:
seriesByTag('name=lp.run_results.run.latency.p95_ms')
Check the time range
If a query returns no data:
-
Confirm the Graphite data source is selected.
-
Widen the time range to Last 24 hours.
-
Retry the query.
Query metrics in Grafana
Open Explore and select the Graphite data source.
Run-level queries
seriesByTag('name=lp.run_results.run.latency.p95_ms')
seriesByTag('name=lp.run_results.run.latency.p99_ms')
seriesByTag('name=lp.run_results.run.peak_throughput')
Filter by run
seriesByTag('name=lp.run_results.run.latency.p95_ms', 'run_id=u5t4tc5h')
Filter by timeline
seriesByTag('name=lp.run_results.run.latency.p95_ms', 'timeline_name=new_timeline')
Filter by run name
seriesByTag('name=lp.run_results.run.latency.p95_ms', 'run_name=new_timeline_24042026083945')
Per-step queries
seriesByTag('name=lp.run_results.latency.p95_ms')
seriesByTag('name=lp.run_results.latency.p95_ms', 'step_id=8li77l9u')
Timeseries queries
seriesByTag('name=lp.run_results.timeseries.requests_per_second')
seriesByTag('name=lp.run_results.timeseries.latency.avg_ms')
Status-code queries
seriesByTag('name=lp.run_results.status_code.count', 'status_code=401')
Create a Grafana dashboard
Create the dashboard
-
Open Dashboards in Grafana.
-
Select New dashboard.
-
Select Add visualization.
-
Choose the Graphite data source.
-
Name the dashboard, for example
Leapwork Performance Dashboard.
Add recommended widgets
Widget 1: Run P95 latency
-
Panel type: Time series
-
Query:
seriesByTag('name=lp.run_results.run.latency.p95_ms')
Widget 2: Run P99 latency
-
Panel type: Time series
-
Query:
seriesByTag('name=lp.run_results.run.latency.p99_ms')
Widget 3: Run peak throughput
-
Panel type: Stat or Time series
-
Query:
seriesByTag('name=lp.run_results.run.peak_throughput')
Widget 4: Run error rate
-
Panel type: Stat or Time series
-
Query:
seriesByTag('name=lp.run_results.run.error_rate_pct')
Widget 5: Track-item requests per second
-
Panel type: Time series
-
Query:
seriesByTag('name=lp.run_results.timeseries.requests_per_second')
Widget 6: Track-item latency over time
-
Panel type: Time series
-
Query:
seriesByTag('name=lp.run_results.timeseries.latency.avg_ms')
Widget 7: Status-code breakdown
-
Panel type: Table, Bar chart, or Stat
-
Query:
seriesByTag('name=lp.run_results.status_code.count', 'status_code=401')
Add recommended filters
Use query-level filters for more targeted results:
-
run_id -
run_name -
timeline_name -
run_status -
project_name -
company_name -
step_id -
step_title -
geo_location
Examples:
seriesByTag('name=lp.run_results.latency.p95_ms', 'run_id=u5t4tc5h')
seriesByTag('name=lp.run_results.latency.p95_ms', 'timeline_name=new_timeline', 'run_status=finished')
Understand Grafana table behavior
Grafana Graphite tables behave differently from relational query tables. Keep the following in mind:
-
Graphite queries return time series, not relational rows.
-
Building tables usually requires transformations such as Rows to fields, Reduce, Join by field, Labels to fields, and Organize fields.
-
Rows to fields pivots metrics into columns but often collapses to a single row.
Tip: For stable dashboards, use separate panels for major metric groups. For per-step tables, use fewer columns per panel.
Troubleshooting
Grafana connection is missing endpoint
Symptom: Error message Grafana connection is missing endpoint.
Cause: No Graphite ingest URL is saved in the connection.
Fix: Set the endpoint to https://<stack>.grafana.net/graphite/metrics.
Grafana connection is missing username
Symptom: Error message Grafana connection is missing username.
Cause: The Graphite username or instance ID was not saved.
Fix: Copy the User value from the Grafana Cloud Graphite setup page and save it in Leapwork Performance.
Grafana connection is missing apiKey
Symptom: Error message Grafana connection is missing apiKey.
Cause: No access token is saved in the connection.
Fix: Create a token under a policy with metrics:write and save it in the connection.
Content-type error
Symptom: Error unknown content-type "application/json; charset=utf-8".
Cause: The request included an unexpected charset parameter.
Fix: Leapwork Performance now sends application/json without charset. Rebuild or restart LeapworkPerformanceRunner if you are on an older build.
Query returns no data
Symptom: A Grafana Explore query shows no results.
Check:
-
Confirm the Graphite data source is selected (not Prometheus).
-
Verify the endpoint ends with
/graphite/metrics. -
Confirm the username is the Graphite instance ID.
-
Verify the token has
metrics:writepermission. -
Check Leapwork Performance logs for successful Grafana publish entries.
-
Confirm the query uses the correct namespace, for example
lp.run_results. -
Widen the time range to Last 24 hours.