Definitions
Redactors
defineRedactor masks secrets in your paths and field names at ingest, before anything is stored.
Vigie already masks fields named like secrets (password, token, authorization, cookie, secret, api_key…), common secret paths such as /reset-password/:token, email addresses (j***@acme.dev) and card numbers. Add your own:
definitions/redactors/acme.ts
import { defineRedactor } from 'vigie/sdk'
/** Webhook and receipt links carry their secret in the path. */
export const acmePaths = defineRedactor({
name: 'Acme secret links',
paths: ['parcelo/webhooks', 'receipts'],
})
| Field | Masks |
|---|---|
paths | The segment after each path: /parcelo/webhooks/abc123 is stored as /parcelo/webhooks/[REDACTED]. |
keys | Any field whose name matches the regular expression. |
mask | What replaces it. [REDACTED] by default. |
Masking happens at ingest, in every signal: span names, URLs, attributes and log bodies. Settings, Redaction shows what is active and what it caught.