DOCS / DATADOG

datadog

Runs your Datadog Synthetic browser tests against each new production deployment, with the test's start URL pointed at the deploy that just went out.

How it works

  1. Your project's Vercel deployments are polled every few minutes using the same token the builds tab uses.
  2. When a production deployment reaches READY on one of your configured branches, the Datadog tests carrying all of your configured tags are resolved.
  3. That set is narrowed to tests recorded against this project's Vercel production domain, so a tag shared across projects will not run another project's tests.
  4. The matching tests are triggered with the start URL host overridden to the deployment that just succeeded. Each test keeps its own path and query.

It is fire and alert: tests are triggered and the run returns immediately. Datadog's own alerting handles pass and fail, so nothing here waits on results, and there is no serverless timeout to worry about.

Configuration

FieldNotes
enabledThe toggle in the panel header. Off means deployments are not polled for this project.
dd_api_keyDatadog API key. Write only - stored encrypted and never returned, so the field starts blank and only carries a replacement.
dd_app_keyDatadog application key, same handling. Needed to search for and trigger tests.
region / siteYour Datadog site, for example datadoghq.eu. Getting this wrong looks like an authentication failure.
test_tagsComma separated. A test must carry all of these tags to be picked up.
branchesComma separated branch names. Leave empty to match any branch.
protection_bypassOptional. Sent as the x-vercel-protection-bypass header so tests can reach deployments behind Vercel authentication.

Click Save config; a green marker confirms the save.

Run tests now

Enter a host, for example my-deploy.vercel.app, and click Run now. This smoke tests the whole setup - keys, region and tag selection - without waiting for a deployment. It reports how many tests were triggered, or tells you nothing matched, which usually means the tags are wrong or the tests are not associated with this project's production domain.

Last run

Shows the status, the branch and deployment targeted, the Datadog batch ID and the tests that were triggered, each linking through to its activity view in Datadog. Check results fetches the pass or fail status for the batch and marks each test in the list. If it says no results yet, the batch is still running - try again in a moment.

Requirements

Vercel project ID and token so deployments can be polled, plus Datadog API and application keys. The tests themselves live in Datadog; nothing here creates or edits them.