What do you weigh before sharing a Playwright trace zip outside the team that produced it?
answer
- Everything the viewer shows is inside
- Opening differs from sending
- Headers and bodies travel too
- Re-record rather than redact
- Decide the rule before the incident
basics
~20 sThat the archive is evidence, not a screenshot: it carries recorded requests and responses, headers, page DOM and test source. Anything a session token, a customer address or an internal endpoint touched during the run is inside it.
solid answer
~50 sA trace is the most useful debugging artifact Playwright produces and the most revealing. Everything the viewer can display is in the zip: request and response records including headers that may carry session cookies or `Authorization` values, response bodies, DOM snapshots of pages that showed real names, addresses and phone numbers on an order tracker, console output, and the test source. Opening one is safe — `trace.playwright.dev` renders locally and uploads nothing — but *sending* one is a data transfer, and the file itself has no access control once it leaves. Before a trace goes to a vendor, a public issue or a wide channel, open it and read the Network tab and the snapshots the way a recipient would. If it carries production data, reproduce against seeded data instead and share that trace. Reserve the raw one for people already entitled to the data it holds.
code
bash · 3 linesunzip -l order-tracker-trace.zip
npx playwright show-trace order-tracker-trace.zipgo deeper
Know that a trace contains far more than a picture of the page, including recorded requests and their headers, so it is not something to paste into a public ticket.
Be able to say what the archive holds because you know what the viewer displays, and separate opening a trace, which leaks nothing, from sending one, which transfers everything.
Show the review habit before sharing, and reach for reproducing the failure against seeded data rather than attempting to edit an archive you cannot fully inspect.
Own the standing rule: which environments produce shareable traces, which channels they may travel through, and what the team does when a trace cannot leave, decided before an incident forces it.
## The zip is the evidence, all of it A trace is valuable precisely because it holds everything the run saw. That is also the whole risk. Anything the Trace Viewer can display came out of the archive, so the archive contains: - **Network records** — request URLs, headers and bodies, and the responses that came back, including payloads a page never displayed. - **DOM snapshots** — the rendered page, which on a food-delivery order tracker means customer names, delivery addresses, phone numbers and order history. - **Console output** — whatever the application logged, which in practice sometimes includes identifiers and tokens developers never meant to surface. - **Test source and call parameters** — your test code, and the arguments each call received. - **Environment details** — the browser, viewport and run information recorded with the trace. None of this is unusual or a defect. It is what makes the artifact work. ## Opening is safe; sending is a transfer These two are worth separating explicitly, because teams routinely confuse them: | Action | Exposure | |---|---| | `npx playwright show-trace` on your own machine | None beyond the machine that already holds the file | | Dropping a zip on `trace.playwright.dev` | None — the page renders it locally rather than uploading it | | Emailing or posting the zip to a colleague | Full contents, to that person and to whatever archives the channel keeps | | Attaching it to a public issue tracker | Full contents, permanently, to anyone | | Serving it at a URL for `?trace=<url>` | Full contents, to anyone who can reach that URL | The hosted viewer is often the thing that gets banned, and it is the one step in that table that leaks nothing. The channel is what matters. ## A review pass before it leaves 1. **Open it yourself** and read it as the recipient will: skim the Network tab's requests and responses, and page through the snapshots around the failure. 2. **Look specifically at headers** on authenticated requests, and at any response body that carries more than the screen displayed. 3. **Ask whether the run touched real data.** A trace from a seeded environment is usually shareable as-is; one from a production-like environment usually is not. 4. **Prefer reproducing the failure against non-production data** and sharing that trace instead. It is nearly always faster than trying to sanitise an archive after the fact. 5. **Match the channel to the contents.** A trace that is fine for the team that owns the service may not be fine for a public ticket, and a zip has no permissions of its own once it is out. ## Why sanitising after the fact rarely works An archive is not a document you can redact confidently. The same value can appear in a request header, a response body, a snapshot's rendered text and a console line, and removing it from one place leaves it in three others. Repacking a trace also risks producing something the viewer will not open, at which point you have spent effort and still cannot share it. Regenerating the failure under conditions you are willing to publish is the cheaper and more honest route. ## The decision to make once, not per incident This is a policy question, not a per-failure judgement call, and it is worth settling before an outage forces it: - Which environments produce traces that may leave the team, and which do not. - Which channel a trace is allowed to travel through, and who may open one. - Whether traces served for `?trace=<url>` links sit behind authentication — remembering that such a URL must also be reachable by the viewer to load at all. - What the team does instead when a trace cannot be shared, so that the answer is a known path rather than an argument during an incident. Whether a run records a trace in the first place, and how long build artifacts are kept, are separate decisions owned elsewhere. The question here is narrower and often skipped: this archive exists and someone outside the team wants it — does it go, as is?
- A vendor asks for a trace to debug their widget on your order-tracker page. What do you send?A trace from a run against seeded data that reproduces the same failure, not the original from a production-like environment. If the failure will not reproduce there, narrow the scenario to the vendor's own surface and record that instead, so the archive carries their widget's traffic rather than your customers' orders.
- Is it safer to have engineers open traces locally rather than on trace.playwright.dev?Not meaningfully. The hosted viewer renders the archive in the browser without uploading it, so both routes keep the file on the machine that already has it. The real control is who receives the zip, not which viewer they use to read it.
- Why not simply strip the sensitive parts out of the archive before sharing it?Because a value typically appears in several places at once — a request header, a response body, rendered snapshot text and a console line — so a partial edit gives false confidence, and repacking can leave an archive the viewer will not open. Regenerating the trace against safe data is more reliable.
saying these in an interview costs you the question
- Treats a trace zip as harmless because it is just debugging output
- Bans the hosted viewer while emailing the same archive freely
- Attaches a production trace to a public issue tracker
- Assumes only screenshots inside the trace can leak data
- Believes deleting one file from the archive sanitises it
- Serves traces at an open URL so links keep working