Docs

Masking

What Sypnia hides in recordings and events without being asked, what you can hide yourself, exactly what masking does to the page, and how to check it.

Applies to EngineCloud At launch

View as Markdown
On this page
  1. The default for a new project
  2. What you can add
  3. Mask an element: data-sypnia-mask
  4. Leave an element out: data-sypnia-block
  5. Mask all text: maskAllText
  6. Switch recording off on a path
  7. Exactly what masking does
  8. Which fields count as password, card or one-time code
  9. What masking does not cover
  10. Check your masking
  11. Open the page in development
  12. Make sure the session is recorded
  13. Watch the replay
  14. Fix what you see, and repeat
  15. Example: the shop’s checkout
  16. Reference

This page is for whoever decides what a replay may show. Masking is done by the browser SDK, so it works the same for the open-source engine and Sypnia Cloud. This page gives the rules; the options and their exact names in code are in Privacy and masking.

Masking happens in the person’s browser, before anything is sent. Masked content never reaches Sypnia, so it cannot be shown, leaked or sent to a model later.

The default for a new project

ContentDefaultCan you change it?
What a person types, in any field. This includes the choice in a dropdown and the text of an editable area.Masked, alwaysNo. There is no option to record typed text.
The content of password, card and one-time-code fieldsMasked, alwaysNo.
Hidden fieldsTheir value is removedNo.
Text shown on the pageRecorded as shownYes: mask an element, or all text.
Frames and videosLeft outNo.
Canvas drawingsNot recordedNo.
ImagesNot copied; the player loads them from their own addressLeave one out with a block.

The default is built so that a project nobody configured does not record secrets. It still records the text your pages display. If your pages display things that must not be seen, use the options below.

What you can add

Mask an element: data-sypnia-mask

Put the attribute on any element. Everything inside it is masked: text, field values, and what appears there later.

checkout.html
<section data-sypnia-mask>
  <h2>Shipping address</h2>
  <p>Ada Park, 12 Elm Street, Springfield</p>
</section>

In the replay the section keeps its shape, and the address reads *** ****, ** *** ******, ***********.

Leave an element out: data-sypnia-block

Put the attribute on any element. It is not recorded at all. The replay shows an empty box of the same size, so the layout stays right.

account.html
<div data-sypnia-block>
  <img src="/documents/id-card.jpg" alt="Identity card" />
</div>

Use a block for images and for anything whose shape alone says too much.

For elements you cannot put an attribute on, such as a widget from another company, the SDK takes a list of selectors to mask and a list to block.

Mask all text: maskAllText

One option of the SDK masks every text of every page. Replays then show the layout, the clicks and the movement, with every word replaced. Events change too: clicks carry no label, and form failures no field name. Choose it for an app that is sensitive throughout, such as health, finance or anything about children.

A project can also turn this on in its settings, for every browser at once and without shipping the app again. Either one is enough: all text is masked when the option or the setting says so.

Switch recording off on a path

A project can list paths where nothing is recorded: no replay and no page snapshot. Recording stops when the person enters such a path and resumes when they leave. Events are still sent from those pages, so problems are still found there. The list is part of the project’s settings, so you can change it without shipping your app again, and the engine refuses recordings of the paths in it, so a tab that is still running old code cannot send them.

Exactly what masking does

Inside a masked element, and everywhere when all text is masked:

WhatBecomes
Letters and digits in textAn asterisk each. Spaces and punctuation stay, so the shape of the text is kept.
Values of fieldsAn asterisk for each character.
Checkboxes, radio buttons, selected optionsShown as not chosen.
Text in attributes: titles, alternative text, placeholders, accessible labelsMasked the same way.
Links to an e-mail address or a phone numberMasked after mailto: or tel:.
Content added laterMasked. A masked area stays masked when the page changes.

And outside recordings:

  • Clicks. An element inside a masked area is reported without a label. A click that lands on masked content has no label even when the button around it is outside the mask.
  • Page snapshots follow the same rules as replays.
  • Addresses. Sign-in parameters (access_token, refresh_token, token, code) are removed from links inside recordings, masked or not.

Which fields count as password, card or one-time code

All typed input is masked, so this list changes nothing you can see. It matters because these fields are also protected against any future option: they can never be recorded.

  • Fields of type password.
  • Fields whose autocomplete is cc-number, cc-csc, cc-exp, cc-exp-month, cc-exp-year, one-time-code, current-password or new-password.
  • Fields whose name or id contains card, cvv, cvc, pin, otp or password.

What masking does not cover

Masking works on text and fields. Know its edges:

  • Text inside an image is not masked, because the recording holds only the image’s address. Block the image.
  • Error messages are sent as your code wrote them, up to 500 characters, with one exception: e-mail addresses are replaced by [email]. If your code throws Customer Ada Park not found, that name is in the error. The same goes for the error message your API returns with a failed call, and for the properties of custom events. The SDK lets you change or drop any event before it is sent.
  • Paths are sent as they are. /customers/ada-park keeps the name. Queries and hashes are never sent.
  • Ingest does not inspect recordings. It stores what the SDK sends and trusts the SDK’s masking. Each recording carries the version of the masking rules it was made with.

Check your masking

At the end you will have seen with your own eyes what a replay of your sensitive pages shows.

  1. Open the page in development

    Run your app with the SDK sending to the development environment, and open a page that shows sensitive data.

    You should see
    The page looks normal. Masking does not change what your users see.
  2. Make sure the session is recorded

    Type something into a field and click around. Then cause an error, for example with the test button from Your first problem: a session with an error is always recorded.

    You should see
    Requests to your ingest address in the browser’s Network tab.
  3. Watch the replay

    Leave the page idle for 2 minutes, then open the session in Sypnia and play it.

    You should see
    What you typed is asterisks. Every element you marked with data-sypnia-mask is asterisks. Every element you marked with data-sypnia-block is an empty box.
  4. Fix what you see, and repeat

    Anything readable that should not be: add data-sypnia-mask or data-sypnia-block, reload and record again. Recordings made before the change keep what they recorded; delete them if needed. See Deleting data.

Example: the shop’s checkout

Part of the checkoutIn the replayWhy
«Your order: Linen shirt, Shipping, Total $64.00»ReadablePage text is recorded as shown, and the order is what you need to see.
The e-mail fieldAsterisksTyped input is always masked.
The card fieldsAsterisks, or an empty box if they live in the payment provider’s frameCard fields are always masked; frames are left out.
The shipping address, shown for confirmationAsterisksThe shop marked that section with data-sypnia-mask.
The Pay button and the five clicks on itVisibleThat is the problem Sypnia is there to show.

Reference

Option names, defaults and how to set them: Privacy and masking. What a replay records in general: Sessions and replay.

Sections

Start hereWhat Sypnia is, how it works, what is open source and what is the paid cloud, and the two ways to get your first problem in plain words.ConceptsThe ten ideas Sypnia is made of, each defined precisely, from a project and its keys to problems, traces and alerts.SDKsHow your app sends data to Sypnia. One SDK for the browser, one for Node, one for Next.js, and the OpenTelemetry intake for every other backend.The agentHow Sypnia analyses a problem, what it writes, what it sends to a model and what it never does.MCP and skillsConnect your coding agent to Sypnia so it can ask what is failing in production, read what it needs to fix it, and set Sypnia up for you.API referenceThe Sypnia HTTP API: one API for the open-source engine and for Sypnia Cloud, with every endpoint, parameter, response and error.CLI referenceThe sypnia command: how to install it, the variables it reads, what its exit codes mean, and where each command is documented.Self-hostingWhat you run when you host the Sypnia engine yourself, what you need, what it costs, and what you do not get compared with Sypnia Cloud.How the engine is builtThe whole Sypnia engine on one page, from a click in your app to the sentence your coding agent reads, with the design rules and the code that holds them.Sypnia CloudHow the paid service works, from organizations and roles to plans, limits, billing, where your data lives, the GitHub App and support.Privacy and securityWhat Sypnia collects from your app and its users, what it never collects, how masking works, how to delete data, and how the service is protected.LicensingWhich licence covers each part of Sypnia, what you may do with it, how the name may be used, and the terms of a contribution.GuidesStep-by-step recipes for the common ways to use Sypnia, from apps made with AI builders and Next.js on Vercel to Supabase, source maps in CI, alert e-mails from your own engine, and moving from Sentry.ReferenceThe pages you look things up in, from the event schema and the glossary to what is planned, the changelog and the common questions.
↑↓ to move↵ to openEsc to close