Skip to main content
No Result Found
Get your setup working faster. Join our Discord for optimisation tips from elite testers. Join our DiscordJoin our Discord

InfluxDB integration for BrowserStack Load Testing

Learn how to send BrowserStack Load Testing metrics to InfluxDB and visualize them in Grafana, so you can correlate load-test activity with your application telemetry.

Use this guide to connect BrowserStack Load Testing with InfluxDB and Grafana. You can send load test metrics to your InfluxDB bucket (push mode), pull server metrics from InfluxDB into your test reports (pull mode), or do both. When pushing, BrowserStack sends metrics every 10 seconds and creates a per-test Grafana dashboard. When pulling, you see correlated server metrics on the same timeline as your load test results.

For an overview of all APM options, see Application Performance Monitoring integration.

Integration modes

InfluxDB supports three integration modes. Choose the one that fits your workflow:

Mode What happens Credentials needed
Send to InfluxDB (push) BrowserStack sends load-test metrics to your InfluxDB bucket every 10 seconds and creates a Grafana dashboard InfluxDB endpoint, organization, bucket, token (needs write permission), and Grafana URL, API key, datasource UID
Read from InfluxDB (pull) BrowserStack fetches server metrics from InfluxDB and displays them on your test report timeline, correlated with load results InfluxDB endpoint, organization, bucket, token (needs read permission), and Grafana URL, API key, datasource UID
Read and send metrics (both) BrowserStack pushes test metrics and pulls server metrics simultaneously All credentials for both directions

Pull mode (Read from InfluxDB and Read and send metrics modes) requires a Pro plan or higher. For details on available plans, see the pricing page.

Prerequisites

Before you begin, ensure you have:

  • InfluxDB account: With at least one organization and one bucket.
  • Grafana organization: With an InfluxDB-typed data source already added under Connections > Data sources.
  • BrowserStack Load Testing account: Access with admin permission to at least one project.

Credentials by mode

Mode Credentials needed
Push mode InfluxDB endpoint URL, organization name, bucket name, API token (needs write permission), Grafana URL, Grafana API key, Grafana data source UID
Pull mode InfluxDB endpoint URL, organization name, API token (needs read permission), and Grafana URL, API key (with datasources:query scope), datasource UID
Both modes All credentials listed above for both push and pull

The integration works against any reachable InfluxDB and Grafana, including managed SaaS (InfluxDB Cloud, Grafana Cloud), self-hosted, and on-premise. The required fields and scopes are the same. You provide your own URLs.

Integration overview

BrowserStack supports two main workflows for InfluxDB integration:

BrowserStack Load Testing pushes 21 standard metrics to your InfluxDB bucket every 10 seconds during a test run, and posts 12 lifecycle event types as Grafana dashboard annotations. Metrics live in InfluxDB, and the dashboard and annotations live in Grafana.

Core capabilities:

  • Metric streaming: BrowserStack aggregates performance data into 10-second time windows and writes it to your InfluxDB bucket over HTTPS.
  • Auto-managed dashboard: BrowserStack creates a per-test Grafana dashboard the first time it sees metrics for that test, and keeps it in sync on subsequent runs.
  • Lifecycle annotations: BrowserStack posts a Grafana annotation for each test event (such as test started or ramp up started), so you can align metric changes with what happened during the run.
  • Scoped annotations: Annotations carry a dashboard-id:<your-dashboard-uid> tag, so events for one load test only appear on that test’s dashboard.

The six browser metrics (LCP, INP, TTFB, CLS, FCP, and network calls) are only available for browser-based and hybrid tests. They will not appear for JMeter, k6, or Locust runs.

Supported metrics (push mode)

When you enable push mode, BrowserStack pushes all 21 standard load-test metrics automatically to your InfluxDB bucket. You do not need to enable individual metrics.

Category Metric name Description
Load browserstack.vu.max Maximum virtual users seen in the time window
Load browserstack.vu.started Virtual users that started during the window
Load browserstack.vu.ended Virtual users that completed during the window
Load browserstack.test.duration Elapsed test time
Requests browserstack.vu.requests.total Total requests in the window
Requests browserstack.requests.rate.avg Average requests per second
Errors browserstack.errors.percentage Error rate as a percentage
Response browserstack.response.time.avg Mean response time in milliseconds
Response browserstack.response.time.min Minimum response time
Response browserstack.response.time.p90 90th percentile response time
Response browserstack.response.time.p95 95th percentile response time
Response browserstack.response.time.p99 99th percentile response time
Response browserstack.response.time.max Maximum response time
Browser browserstack.browser.lcp Largest Contentful Paint (browser-based and hybrid tests only)
Browser browserstack.browser.inp Interaction to Next Paint (browser-based and hybrid tests only)
Browser browserstack.browser.ttfb Time to First Byte (browser-based and hybrid tests only)
Browser browserstack.browser.cls Cumulative Layout Shift (browser-based and hybrid tests only)
Browser browserstack.browser.fcp First Contentful Paint (browser-based and hybrid tests only)
Browser browserstack.browser.network.calls.total Browser network call count (browser-based and hybrid tests only)
System browserstack.system.cpu.usage Engine CPU usage
System browserstack.system.memory.usage Engine memory usage

Every metric carries these tags: test_id, dashboard_id, load_test_name, region, and executorname.

Lifecycle events

BrowserStack posts one Grafana annotation per lifecycle event, color-coded for quick scanning.

Event When it fires
running Test transitions from queued to running
queued Test is waiting to run
completed Test reaches a terminal state
stopped A user manually stops the test
error An error occurs during test execution
passed Test completes successfully
failed Test completes with failures
timedout Test exceeds the configured timeout
rampup_started The ramp-up phase begins
rampdown_started The ramp-down phase begins
iteration_started An iteration begins
iteration_ended An iteration completes

Configure InfluxDB

Choose whether you want to send metrics to InfluxDB, pull server metrics from InfluxDB, or both:

Select how you want to configure push mode:

Use the following steps to collect seven values, four from your InfluxDB instance and three from your Grafana, and paste them into the Connect form:

Open the InfluxDB Connect form

To open the Connect form:

  1. Navigate to the BrowserStack Load Testing dashboard.
  2. Click Integrations > APM apps > InfluxDB.
  3. Click Connect.

A form opens with seven fields. Keep this tab open while you collect the values in the following steps.

Get your InfluxDB endpoint URL

Your endpoint URL is the host URL of your InfluxDB instance. To find it:

  1. Open your InfluxDB console.
  2. Copy the URL from your browser’s address bar and keep only the host part (for example, https://us-east-1-1.aws.cloud2.influxdata.com).
  3. Paste it into the InfluxDB Endpoint URL field in BrowserStack.

Note your organization name

To find your organization name:

  1. In the InfluxDB console, look at the organization switcher in the top-left corner.
  2. Copy the organization name exactly as shown. The value is case-sensitive.
  3. Paste it into the Organization field in BrowserStack.

Pick or create a bucket

A bucket is where InfluxDB stores your time-series data. You can use an existing bucket, or create a new one named for load testing (for example, browserstack-load-tests). A dedicated bucket keeps BrowserStack data separate from your application metrics.

To pick or create a bucket:

  1. In the InfluxDB console, click Load Data > Buckets.
  2. Click Create Bucket to create a new bucket, or pick an existing one.
  3. Copy the bucket name.
  4. Paste it into the Bucket field in BrowserStack.

Create an API token

The API token authorizes BrowserStack to write metrics into the bucket you selected. To create it:

  1. In the InfluxDB console, click Load Data > API Tokens.
  2. Click Generate API Token > Custom API Token.
  3. Set a description such as BrowserStack Load Testing.
  4. Under Buckets, find the bucket from the previous step and check both Read and Write.
  5. Click Generate.
  6. Copy the token immediately. InfluxDB does not show it again.
  7. Paste it into the API Token field in BrowserStack.

The token requires write:buckets and read:buckets scopes on the bucket from the previous step. BrowserStack uses write to push metrics, and uses read when saving to verify that the token works.

Get your Grafana URL

Your Grafana URL is the host URL of your Grafana instance. To find it:

  1. Open Grafana.
  2. Copy your stack URL (for example, https://myorg.grafana.net).
  3. Paste it into the Grafana URL field in BrowserStack.

Create a Grafana service account API key

The Grafana API key lets BrowserStack create the dashboard and post annotations on your behalf. To create the key:

  1. In Grafana, click Administration > Users and access > Service accounts.
  2. Click Add service account.
  3. Name it browserstack-load-testing and pick the role Editor.
  4. Click Create.
  5. On the service-account detail page, click Add service account token.
  6. Set a display name and pick an expiration date. Rotate the key every 90 days.
  7. Click Generate token.
  8. Copy the glsa_... token immediately. Grafana does not show it again.
  9. Paste it into the Grafana API Key field in BrowserStack.

The default Editor role grants the four required scopes:

  • dashboards:create and dashboards:write to create and update your load-test dashboard.
  • annotations:write to post lifecycle events.
  • datasources:read to verify your data source UID at save time.

If you use a custom role, make sure that the role includes these scopes.

Find your Grafana data source UID

The UID tells BrowserStack which InfluxDB data source in your Grafana to point the dashboard at. Make sure this UID belongs to an InfluxDB-typed data source, not a Prometheus or other type. BrowserStack verifies the type at save time.

To find the UID:

  1. In Grafana, click Connections > Data sources.
  2. Click the InfluxDB data source that you want BrowserStack to use.
  3. Look at your browser’s address bar. The UID is the last segment of the URL, as shown in the following example:

    https://myorg.grafana.net/connections/datasources/edit/cflt8gnh3a8owc
                                                           ^^^^^^^^^^^^^^
                                                                 UID
    
  4. Copy the UID.
  5. Paste it into the Grafana Datasource UID field in BrowserStack.

Save and verify

Click Save in the BrowserStack Connect form. BrowserStack runs a five-step health check that takes 2 to 5 seconds. You see one of the following results:

  • A green Connected badge if all seven credentials are valid. You can now run a load test and view results in Grafana.
  • A red error message identifying which field is wrong. Fix that field and click Save again. For common errors, see the Troubleshooting section.

Verify the integration

After your next test run completes, confirm that metrics are flowing to your Grafana dashboard:

Open the test run details.

In the BrowserStack Load Testing dashboard, navigate to the test run you just completed. Open the test run’s detail page to view the results.

Click APM Tools in the side panel.

On the test run’s detail page, locate the APM Tools section in the side panel. Click it to expand and view all connected APM tools.

Locate the InfluxDB card and click Open in Grafana.

In the APM Tools panel, find the InfluxDB card. Click the Open in Grafana button to view your test metrics in Grafana.

Confirm the Grafana dashboard is displaying your data.

Your Grafana dashboard should open in a new tab. Verify that the dashboard shows panels with data for VU max, response time, and error percentage from your load test run. If data is present, the InfluxDB integration is working correctly.

Pull mode limitations

  • You can use one APM tool at a time. If you connect InfluxDB in pull mode and later want to pull from Prometheus, you must disconnect InfluxDB first.
  • You select one host and the metrics to pull. If you select more than 50 metrics, the chart renders partially.
  • Data is fetched live, not stored. When you open a test report, BrowserStack queries InfluxDB for the metrics. If your InfluxDB instance has aged out the data, the report shows “No metric data.” This is especially relevant for old report exports or archives.
  • The settlement window is 5 minutes. After your test ends, the chart continues querying every 20 seconds for 5 minutes while InfluxDB ingests the last data buckets. After the window closes, the chart only updates when you reopen the report.
  • Credentials do not need a reconnect to switch modes. If you connected InfluxDB for push and later enable pull, you add the Grafana URL and API key to the same connection. Switching modes later does not disconnect the tool.

Troubleshooting

The following table lists common errors and how to fix them.

Symptom Cause Fix
Save fails with Invalid API token InfluxDB token is wrong, revoked, or missing required scopes Regenerate the token (see the Create an API token step). Make sure both Read and Write are checked for your bucket.
Save fails with Bucket not found Bucket name typo, or the token does not have access to the bucket Confirm the bucket name in InfluxDB (bucket names are case-sensitive), and confirm that the token’s scope covers this exact bucket.
Save fails with Organization not found Organization name typo (case-sensitive) Re-copy the name from the InfluxDB console’s organization switcher.
Save fails with Datasource UID not found or the API key lacks datasources:read scope Grafana returns 403 for both cases Confirm the UID in Grafana (see the Find your Grafana data source UID step) and confirm that your service account has the Editor role or higher.
Save fails with Datasource type mismatch, expected influxdb The Datasource UID you pasted points to a different type, for example Prometheus Select the InfluxDB-typed data source in Grafana and paste its UID.
Save fails with Grafana API key insufficient permissions Service-account role does not grant dashboards:create, dashboards:write, or annotations:write Promote the service account to Editor, or add a custom role that includes the four required scopes.
Save fails with Minimum Grafana version 9.x required You are on an older Grafana that does not support the RBAC permissions endpoint Upgrade Grafana to 9.0 or later.
Save succeeds, but no metrics appear in InfluxDB after a test run API token has read scope only Regenerate the token with both Read and Write checked.
Annotations appear in a single color instead of per-event colors Browser cache on the dashboard Hard-refresh the dashboard. Colors come from per-event annotation tracks and render correctly after refresh.
Cannot reach InfluxDB endpoint Endpoint URL typo, network or firewall issue, or InfluxDB region down Confirm the endpoint URL. To verify connectivity, run curl -I <your-endpoint-url>/health and check for a 200 OK response.

How BrowserStack stores your credentials

BrowserStack encrypts all seven credentials at rest in the integrations service. The Load Testing service never sees the raw token or API key. It asks the integrations service to push metrics and create dashboards on your behalf. BrowserStack sends your credentials only to InfluxDB and Grafana, and never logs them or exposes them to other tools.

To revoke access at any time, navigate to Integrations > APM apps > InfluxDB in the Load Testing dashboard and click Disconnect.

Next steps

  • Run a load test: See the Get started guide to run your first test.
  • Customize the dashboard: Add panels for your application-specific metrics. BrowserStack does not overwrite panels that you create.
  • Set up alerts: Use Grafana alerting on the metrics that BrowserStack publishes. For example, alert if browserstack.errors.percentage exceeds 5% during a scheduled test. See the Grafana alerting documentation.
  • Add Prometheus: Many teams run InfluxDB and Prometheus side by side. See Prometheus integration.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle