Last updated 26 November 2026. By Paul Badarau.
Bea, a fictional developer, builds the booking form for a physiotherapy clinic. A failed booking throws Booking failed for Maria Costa, 12 Rua Nova, card 4111 1111 1111 1111. Monitoring stores that message as Booking failed for Maria Costa, 12 Rua Nova, card [card]. The card number matched a pattern. The name and the street did not, and they are now in the issue title.
Monitoring removes a lot before anything is stored. Error events lose request bodies, headers, cookies, user data, IP addresses and the query values of URLs. Log lines lose attributes named user. or client. and header and body attributes. Values under names such as password, token, secret, authorization, cookie, session, API key, email or phone are replaced with [Filtered]. In text, bearer and basic credentials, JWTs, passwords in URLs, key=value secrets, email addresses, IP addresses and card numbers that pass the Luhn check are replaced.
The rest is up to the code that sends it:
- Write messages without personal data.
Booking failedwith the booking number as a tag tells Bea as much as the name did. - Send sensitive values as named fields, such as
{ email: value }, so the name decides that they are filtered. - Scrub errors in
beforeSendinSentry.init: change or remove what you know is private in the event, and return it. - Scrub log lines in
beforeSendLog, for examplebeforeSendLog(log) { delete log.attributes?.patientName; return log; }. Returningnulldrops the line. - Drop breadcrumbs that print form data in
beforeBreadcrumb, for example any with theconsolecategory.
The path of a URL is kept as sent. A reset link like /reset/8f3a9c2e71 keeps its token in the request URL and in breadcrumbs, even though query values are removed, so rewrite such paths in beforeSend and beforeBreadcrumb. Issue titles also go into the new-issue email to Owners and Administrators, after the same redaction, so a name in an error message also lands in their inboxes. Events are kept for 7 days and issue summaries for 30 days after the last event.
The product page for this is Monitoring.