Skip to main content
To create and manage environment variables and secrets, including inheritance and where to set them, see the Environment Variables documentation.

Built-in variables in Playwright Check Suites

Checkly sets the following environment variables on every Playwright Check Suite run:

CHECKLY_RUN_SOURCE values

Use built-in variables

Use Checkly’s built-in environment variables to tune test behavior for different run contexts.

Adjust behavior based on trigger type

Use different timeouts for scheduled runs and manual triggers:

Configure Playwright by environment

Use the built-in CHECKLY environment variable in your playwright.config.ts to use different settings for Checkly runs and local development.
playwright.config.ts
Playwright Check Suites record traces for successful and failed runs. Checkly uses these traces to show dedicated Network and Browser console sections, so you can compare requests, logs, and errors when you troubleshoot.
You can also adjust these settings for Checkly runs:
  • maxFailures: stop early during monitoring runs, for example after the first failure.
  • timeout: give tests more or less time in Checkly than during local development.
  • expect.timeout: tune assertion timeouts for production or staging environments.
  • retries: override Checkly’s default retry count if your suite needs a different policy.

Access region information

Use region information for debugging or region-specific behavior:

Correlate a run with its trace

When Traces is active, use CHECKLY_TRACE_ID to link a check run to the trace in your observability backend — for example by logging it, or by tagging telemetry your test emits itself:
CHECKLY_TRACEPARENT and CHECKLY_TRACESTATE carry the same trace context as standard W3C Trace Context header values, ready to pass to your own tooling. All three variables are unset when Traces is not active, so if (process.env.CHECKLY_TRACE_ID) reliably tells you whether the run is traced.