Playwright agent observability
Use the @tracify/playwright reporter when an agent acts through a browser and you need the test outcome beside the agent's model, tool, and API spans. Playwright remains the runner and the owner of trace.zip; Tracify receives the execution evidence and links back to the artifact.
Install from the workspace
The adapter is currently maintained in this repository and is not presented as a public registry package until its first release. From the repository root:
npm install ./packages/playwright @playwright/test
Set TRACIFY_API_KEY in the CI environment, then register the reporter:
import { defineConfig } from "@playwright/test";
import TracifyReporter from "@tracify/playwright";
export default defineConfig({
reporter: [[TracifyReporter, {
environment: "ci",
release: process.env.GITHUB_SHA,
traceArtifactUrl: process.env.PLAYWRIGHT_TRACE_URL,
}]],
});
Event contract
The reporter maps Playwright lifecycle data into the existing Tracify span shape. The first contract covers:
runandci_metadatafor the test run and CI context.test_stepfor test cases and Playwright steps.assertionfor expectation steps.browser_action,network_request, andconsole_errorfor fixture or helper instrumentation.screenshotandtrace_artifactfor references to captured artifacts.
Use the reporter's record* helpers when a fixture observes an event that the Playwright reporter API does not expose directly:
reporter.recordBrowserAction("submit order", { selector: "button[type=submit]" });
reporter.recordNetworkRequest("POST /api/orders", { statusCode: 201 });
reporter.recordConsoleError("Unhandled page error", { page: "/checkout" });
Each event preserves its status, timing, parent relationship, metadata, and error details. traceArtifactUrl links the original Playwright artifact; Tracify does not reimplement the Playwright Trace Viewer.
Data boundaries
The adapter sends event metadata and artifact references by default. It does not upload screenshot bytes, request bodies, or arbitrary test attachments. Review the existing project redaction and retention settings before adding sensitive values to event metadata.