Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,14 @@ We currently support the following configuration options. We will update this li
</Tab>
</Tabs>


<Warning>
A check using [the Playwright Test Runner (`@playwright/test`)](https://playwright.dev/docs/intro) will currently run around 30-50% longer than [a regular Playwright check (`playwright`)](https://playwright.dev/docs/library). This is caused by the automatic creation of trace and video assets. We are aware of this and are investigating solutions. If this is significantly degrading the performance of your check, we recommend to divide longer tests into multiple checks.
</Warning>

<Note>
When `use.extraHTTPHeaders` is missing from the Playwright configuration, Checkly adds its trace headers automatically. See how to [add Checkly's trace headers to your custom HTTP headers](/resolve/traces/overview#add-trace-headers-to-custom-http-headers).
</Note>

## Hooks
Playwright Test Runner offers hook functions such as `test.afterEach()` and `test.beforeEach()` that run before or after individual test cases or `test.afterAll()` and `test.beforeAll()` that run before or after all tests have started/finished.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ Checkly enforces these options for every run. User configuration does not overri

Checkly supports Playwright's [`globalTimeout`](https://playwright.dev/docs/api/class-testconfig#test-config-global-timeout). Use it to control the maximum duration of the Playwright suite after `npx playwright test` starts.

<Note>
When `use.extraHTTPHeaders` is missing from the Playwright configuration, Checkly adds its trace headers automatically. See how to [add Checkly's trace headers to your custom HTTP headers](/resolve/traces/overview#add-trace-headers-to-custom-http-headers).
</Note>

Playwright Check Suites also provide specific configuration for your Playwright monitoring.

* `installCommand:` Override the command to install dependencies. `npm install --dev` is used by default.
Expand Down
18 changes: 17 additions & 1 deletion resolve/traces/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,22 @@ See this in action in the video below:
<iframe src="https://www.loom.com/embed/30c143388ba54e9ba6b665dfbfe0d295?sid=8ad8d273-b0bb-48ca-b456-1b137384b9de" title="Embedded content" className="w-full aspect-video rounded-xl" frameBorder="0" allowfullscreen />
</Frame>

## Add trace headers to custom HTTP headers

When `use.extraHTTPHeaders` is not set, Checkly uses default headers that include `traceparent` and `tracestate`. To add these trace headers to custom headers:

```javascript
test.use({
extraHTTPHeaders: {
...existingHeaders,
traceparent: process.env.CHECKLY_TRACEPARENT,
tracestate: process.env.CHECKLY_TRACESTATE
},
})
```

See the built-in variables for [Browser checks](/detect/synthetic-monitoring/browser-checks/mac-structure#built-in-runtime-variables) and [Playwright Check Suites](/detect/synthetic-monitoring/playwright-checks/environment-variables#built-in-variables-in-playwright-check-suites).

## Works hand-in-hand with Rocky AI

Checkly Traces automatically integrates with Rocky AI, helping you automatically analyze root causes of check failures. [Rocky AI Root Cause Analysis](/resolve/ai-root-cause-analysis/overview) can search, fetch and interpret Open Telemetry (OTeL) traces ingested by Checkly Traces and use it as a piece of "evidence" in determining why and where a check failed.\
Expand Down Expand Up @@ -83,4 +99,4 @@ Here's an actual example from Checkly's own backend.
<Accordion title="Seamless Integration">
Works with existing OpenTelemetry instrumentation and popular observability platforms without requiring changes to your application logic.
</Accordion>
</AccordionGroup>
</AccordionGroup>
6 changes: 4 additions & 2 deletions snippets/generic-runtime-variables-table.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
| `CHECK_RESULT_ID` | The UUID where the result will be saved. | Only available on scheduled runs. |
| `CHECK_RUN_ID` | The UUID of the check run execution. | Only available on scheduled runs. |
| `CHECK_TYPE` | The type of the check, e.g. `BROWSER`. | |
| `CHECKLY_TRACE_ID` | The OpenTelemetry trace ID of the check run. Use it to correlate the run with the trace in your own observability backend. | Only in Browser and Multistep checks and API setup & teardown scripts, and only when [Traces](/resolve/traces/overview) is active for the check; unset otherwise. |
| `CHECKLY_TRACE_ID` | The OpenTelemetry trace ID of the check run. Use it to correlate the run with the trace in your own observability backend. | Only in Browser checks, Multistep checks, Playwright Check Suites, and API setup & teardown scripts, and only when [Traces](/resolve/traces/overview) is active for the check, unset otherwise. |
| `CHECKLY_TRACEPARENT` | The W3C `traceparent` header value of the check run's trace. Use it to propagate the trace context to your own tooling. | Only in Browser checks, Multistep checks, Playwright Check Suites, and only when [Traces](/resolve/traces/overview) is active for the check, unset otherwise. |
| `CHECKLY_TRACESTATE` | The W3C `tracestate` header value of the check run's trace. Use it with `CHECKLY_TRACEPARENT` to propagate the full trace context. | Only in Browser checks, Multistep checks, Playwright Check Suites, and only when [Traces](/resolve/traces/overview) is active for the check, unset otherwise. |
| `PUBLIC_IP_V4` | The IPv4 of the check run execution. | |
| `PUBLIC_IP_V6` | The IPv6 of the check run execution. | |
| `REGION` | The current region, e.g. `us-west-1`. | |
| `RUNTIME_VERSION` | The version of the runtime, e.g, `2023.09`. | Only in Browser, Multistep, and API setup/teardown scripts. |
| `RUNTIME_VERSION` | The version of the runtime, e.g, `2023.09`. | Only in Browser, Multistep, and API setup/teardown scripts. |
Loading