{"componentChunkName":"component---src-templates-platform-tsx","path":"/platforms/dotnet/data-management/sensitive-data/advanced-datascrubbing/","result":{"data":{"file":{"id":"088650bf-1a0b-592c-87d6-6dc43de4d231","relativePath":"common/data-management/sensitive-data/advanced-datascrubbing.mdx","sourceInstanceName":"platforms","childMarkdownRemark":null,"childMdx":{"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Advanced Data Scrubbing\",\n  \"sidebar_order\": 4,\n  \"keywords\": [\"pii\", \"gdpr\", \"personally identifiable data\", \"compliance\"]\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar Alert = makeShortcode(\"Alert\");\nvar CodeTabs = makeShortcode(\"CodeTabs\");\nvar CodeBlock = makeShortcode(\"CodeBlock\");\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"In addition to using \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"../#scrubbing-data\"\n  }), mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"beforeSend\")), \" in your SDK or our \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"../#server-side-controls\"\n  }), \"regular server-side data scrubbing features\"), \" to redact sensitive data, Advanced Data Scrubbing is an alternative way to redact sensitive information just before it is saved in Sentry. It allows you to:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Define custom regular expressions to match on sensitive data\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Detailed tuning on which parts of an event to scrub\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Partial removal or hashing of sensitive data instead of deletion\")), mdx(\"h2\", {\n    \"id\": \"a-basic-example\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#a-basic-example\",\n    \"aria-label\": \"a basic example permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"A Basic Example\"), mdx(\"p\", null, \"Go to your project- or organization-settings and click \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Security and Privacy\"), \" in the sidebar. Scrolling down, you will find a new section \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Advanced Data Scrubbing\"), \".\"), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Click on \", mdx(\"em\", {\n    parentName: \"li\"\n  }, \"Add Rule\"), \". You will be presented with a new dialog.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Select \", mdx(\"em\", {\n    parentName: \"li\"\n  }, \"Mask\"), \" as \", mdx(\"em\", {\n    parentName: \"li\"\n  }, \"Method\"), \".\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Select \", mdx(\"em\", {\n    parentName: \"li\"\n  }, \"Credit card numbers\"), \" as \", mdx(\"em\", {\n    parentName: \"li\"\n  }, \"Data Type\"), \".\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Enter \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$string\"), \" as \", mdx(\"em\", {\n    parentName: \"li\"\n  }, \"Source\"), \".\")), mdx(\"p\", null, \"As soon as you hit \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Save\"), \", we will attempt to find all creditcard numbers in your events going forward, and replace them with a series of \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"******\"), \".\"), mdx(\"p\", null, \"For a more verbose tutorial check out \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://blog.sentry.io/2020/07/02/sentry-data-wash-now-offering-advanced-scrubbing/\"\n  }), \"this blogpost\"), \".\"), mdx(\"p\", null, \"Rules generally consist of three parts:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"A \", mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"#methods\"\n  }), mdx(\"em\", {\n    parentName: \"a\"\n  }, \"Method\")), \": What to do.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"A \", mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"#data-types\"\n  }), mdx(\"em\", {\n    parentName: \"a\"\n  }, \"Data Type\")), \": What to look for.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"A \", mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"#sources\"\n  }), mdx(\"em\", {\n    parentName: \"a\"\n  }, \"Source\")), \": Where to look.\")), mdx(\"h2\", {\n    \"id\": \"methods\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#methods\",\n    \"aria-label\": \"methods permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Methods\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"em\", {\n    parentName: \"li\"\n  }, \"Remove\"), \": Remove the entire field. We may choose to either set it to \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"null\"), \", remove it entirely, or replace it with an empty string depending on technical constraints.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"em\", {\n    parentName: \"li\"\n  }, \"Mask\"), \": Replace all characters with \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"*\"), \".\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"em\", {\n    parentName: \"li\"\n  }, \"Hash\"), \": Replace the matched substring with a hashed value.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"em\", {\n    parentName: \"li\"\n  }, \"Replace\"), \": Replace the matched substring with a constant \", mdx(\"em\", {\n    parentName: \"li\"\n  }, \"placeholder\"), \" value (defaulting to \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"[Filtered]\"), \").\")), mdx(\"h2\", {\n    \"id\": \"data-types\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#data-types\",\n    \"aria-label\": \"data types permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Data Types\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Regex Matches\"), \": Custom regular expression. For example: \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"[a-zA-Z0-9]+\"), \". Some notes:\"), mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Do not write \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"/[a-zA-Z0-9]+/g\"), \", as that will search for a literal \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"/\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"/g\"), \".\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"For case-insensitivity, prefix your regex with \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"(?i)\"), \".\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"If you're trying to use one of the popular regex \\\"IDEs\\\" like \", mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"https://regex101.com/\"\n  }), \"regex101.com\"), \", Golang is usually closest to how Sentry understands your regex.\"))), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Credit Card Numbers\"), \": Any substrings that look like credit card numbers.\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Password Fields\"), \": Any substrings that look like they may contain passwords. Any string that mentions passwords, auth tokens or credentials, any variable that is called \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"password\"), \" or \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"auth\"), \".\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"em\", {\n    parentName: \"p\"\n  }, \"IP Addresses\"), \": Any substrings that look like valid IPv4 or IPv6 addresses.\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"em\", {\n    parentName: \"p\"\n  }, \"IMEI Numbers\"), \": Any substrings that look like an IMEI or IMEISV.\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Email Addresses\"))), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"em\", {\n    parentName: \"p\"\n  }, \"UUIDs\"))), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"em\", {\n    parentName: \"p\"\n  }, \"PEM Keys\"), \": Any substrings that look like the content of a PEM-keyfile.\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Auth in URLs\"), \": Usernames and passwords in URLs like \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"https://user:pass@example.com/foo\"), \".\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"em\", {\n    parentName: \"p\"\n  }, \"US social security numbers\"), \": 9-digit social security numbers for the USA.\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Usernames in filepaths\"), \": For example \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"myuser\"), \" in \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/Users/myuser/file.txt\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"C:/Users/myuser/file.txt\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"C:/Documents and Settings/myuser/file.txt\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/home/myuser/file.txt\"), \", ...\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"em\", {\n    parentName: \"p\"\n  }, \"MAC Addresses\"))), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Anything\"), \": Matches any value. This is useful if you want to remove a certain JSON key by path using \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"#sources\"\n  }), mdx(\"em\", {\n    parentName: \"a\"\n  }, \"Sources\")), \" regardless of the value.\"))), mdx(Alert, {\n    title: \"Sentry does not know what your code does\",\n    level: \"warning\",\n    mdxType: \"Alert\"\n  }, mdx(\"markdown\", null, mdx(\"p\", null, \"Sentry does not know if a local variable that looks like a credit card number actually is one. As such, you need to expect not only false-positives but also false-negatives. \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"#sources\"\n  }), mdx(\"em\", {\n    parentName: \"a\"\n  }, \"Sources\")), \" can help you in limiting the scope in which your rule runs.\"))), mdx(\"h2\", {\n    \"id\": \"sources\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#sources\",\n    \"aria-label\": \"sources permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Sources\"), mdx(\"p\", null, \"Selectors allow you to restrict rules to certain parts of the event. This is useful to unconditionally remove certain data by event attribute, and can also be used to conservatively test rules on real data. A few examples:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"**\"), \" to scrub everything\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$error.value\"), \" to scrub in the exception message\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$message\"), \" to scrub the event-level log message\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"extra.'My Value'\"), \" to scrub the key \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"My Value\"), \" in \\\"Additional Data\\\"\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"extra.**\"), \" to scrub everything in \\\"Additional Data\\\"\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$http.headers.x-custom-token\"), \" to scrub the request header \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"X-Custom-Token\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$user.ip_address\"), \" to scrub the user's IP address\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$frame.vars.foo\"), \" to scrub a stack trace frame variable called \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"foo\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"contexts.device.timezone\"), \" to scrub a key from the Device context\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"tags.server_name\"), \" to scrub the tag \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"server_name\"))), mdx(\"p\", null, \"All key names are treated case-insensitively.\"), mdx(\"h3\", {\n    \"id\": \"using-an-event-id-to-auto-complete-sources\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#using-an-event-id-to-auto-complete-sources\",\n    \"aria-label\": \"using an event id to auto complete sources permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Using an event ID to auto-complete sources\"), mdx(\"p\", null, \"Above the \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Source\"), \" input field you will find another input field for an event ID. Providing a value there allows for better auto-completion of arbitrary \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Additional Data\"), \" fields and variable names.\"), mdx(\"p\", null, \"The event ID is purely optional and the value is not saved as part of your settings. Data scrubbing settings always apply to all new events within a project/organization (going forward).\"), mdx(\"h3\", {\n    \"id\": \"advanced-source-names\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#advanced-source-names\",\n    \"aria-label\": \"advanced source names permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Advanced source names\"), mdx(\"p\", null, \"Data scrubbing always works on the raw event payload. Keep in mind that some fields in the UI may be called differently in the JSON schema. When looking at an event there should always be a link called \\\"JSON\\\" present that allows you to see what the data scrubber sees.\"), mdx(\"p\", null, \"For example, what is called \\\"Additional Data\\\" in the UI is called \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"extra\"), \" in the event payload. To remove a specific key called \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"foo\"), \", you would write:\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"text\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-text\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-text\"\n  }), \"[Remove] [Anything] from [extra.foo]\")))))), mdx(\"p\", null, \"Another example. Sentry knows about two kinds of error messages: the exception message, and the top-level log message. Here is an example of how such an event payload as sent by the SDK (and downloadable from the UI) would look like:\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"json\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"json\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-json\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-json\"\n  }), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"{\"), \"\\n  \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token property\"\n  }), \"\\\"logentry\\\"\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token operator\"\n  }), \":\"), \" \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"{\"), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token property\"\n  }), \"\\\"formatted\\\"\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token operator\"\n  }), \":\"), \" \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token string\"\n  }), \"\\\"Failed to roll out the dinglebop\\\"\"), \"\\n  \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"}\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \",\"), \"\\n  \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token property\"\n  }), \"\\\"exception\\\"\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token operator\"\n  }), \":\"), \" \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"{\"), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token property\"\n  }), \"\\\"values\\\"\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token operator\"\n  }), \":\"), \" \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"[\"), \"\\n      \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"{\"), \"\\n        \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token property\"\n  }), \"\\\"type\\\"\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token operator\"\n  }), \":\"), \" \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token string\"\n  }), \"\\\"ZeroDivisionError\\\"\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \",\"), \"\\n        \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token property\"\n  }), \"\\\"value\\\"\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token operator\"\n  }), \":\"), \" \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token string\"\n  }), \"\\\"integer division or modulo by zero\\\"\"), \"\\n      \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"}\"), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"]\"), \"\\n  \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"}\"), \"\\n\", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"}\"))))))), mdx(\"p\", null, \"Since the \\\"error message\\\" is taken from the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"exception\"), \"'s \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"value\"), \", and the \\\"message\\\" is taken from \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"logentry\"), \", we would have to write the following to remove both from the event:\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"text\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-text\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-text\"\n  }), \"[Remove] [Anything] from [exception.values.*.value]\\n[Remove] [Anything] from [logentry.formatted]\")))))), mdx(\"h3\", {\n    \"id\": \"boolean-logic\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#boolean-logic\",\n    \"aria-label\": \"boolean logic permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Boolean Logic\"), mdx(\"p\", null, \"You can combine sources using boolean logic.\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Prefix with \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"!\"), \" to invert the source. \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"foo\"), \" matches the JSON key \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"foo\"), \", while \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"!foo\"), \" matches everything but \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"foo\"), \".\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Build the conjunction (AND) using \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"&&\"), \", such as: \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"foo && !extra.foo\"), \" to match the key \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"foo\"), \" except when inside of \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"extra\"), \".\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Build the disjunction (OR) using \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"||\"), \", such as: \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"foo || bar\"), \" to match \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"foo\"), \" or \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"bar\"), \".\")), mdx(\"h3\", {\n    \"id\": \"wildcards\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#wildcards\",\n    \"aria-label\": \"wildcards permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Wildcards\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"**\"), \" matches all subpaths, so that \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"foo.**\"), \" matches all JSON keys within \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"foo\"), \".\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"*\"), \" matches a single path item, so that \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"foo.*\"), \" matches all JSON keys one level below \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"foo\"), \".\")), mdx(\"h3\", {\n    \"id\": \"value-types\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#value-types\",\n    \"aria-label\": \"value types permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Value Types\"), mdx(\"p\", null, \"Select subsections by JSON-type using the following:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$string\"), \": Matches any string value\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$number\"), \": Matches any integer or float value\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$datetime\"), \": Matches any field in the event that represents a timestamp\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$array\"), \": Matches any JSON array value\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$object\"), \": Matches any JSON object\")), mdx(\"p\", null, \"Select known parts of the schema using the following:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$error\"), \": Matches a single exception instance. Alias for \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"exception.values.*\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$stack\"), \": Matches a stack trace instance. Alias for \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"stacktrace || $error.stacktrace || $thread.stacktrace\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$frame\"), \": Matches a frame in a stack trace. Alias for \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$stacktrace.frames.*\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$http\"), \": Matches the HTTP request context of an event. Alias for \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"request\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$user\"), \": Matches the user context of an event. Alias for \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"user\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$message\"), \": Matches the top-level log message. Alias for \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$logentry.formatted\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$logentry\"), \": Matches the \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"logentry\"), \" attribute of an event. Alias for \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"logentry\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$thread\"), \": Matches a single thread instance. Alias for \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"threads.values.*\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$breadcrumb\"), \": Matches a single breadcrumb. Alias for \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"breadcrumbs.values.*\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$span\"), \": Matches a \", mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"/product/performance/distributed-tracing/#spans\"\n  }), \"trace span\"), \". Alias for \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"spans.*\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"$sdk\"), \": Matches the SDK context. Alias for \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"sdk\"))), mdx(\"h3\", {\n    \"id\": \"escaping-special-characters\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#escaping-special-characters\",\n    \"aria-label\": \"escaping special characters permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Escaping Special Characters\"), mdx(\"p\", null, \"If the object key you want to match contains whitespace or special characters, you can use quotes to escape it:\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"text\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-text\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-text\"\n  }), \"[Remove] [Anything] from [extra.'my special value']\")))))), mdx(\"p\", null, \"This matches the key \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"my special value\"), \" in \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Additional Data\"), \".\"), mdx(\"p\", null, \"To escape \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"'\"), \" (single quote) within the quotes, replace it with \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"''\"), \" (two quotes):\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"text\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-text\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-text\"\n  }), \"[Remove] [Anything] from [extra.'my special '' value']\")))))), mdx(\"p\", null, \"This matches the key \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"my special ' value\"), \" in \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Additional Data\"), \".\"), mdx(\"h2\", {\n    \"id\": \"known-limitations-of-server-side-data-scrubbing\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#known-limitations-of-server-side-data-scrubbing\",\n    \"aria-label\": \"known limitations of server side data scrubbing permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Known Limitations of server-side data scrubbing\"), mdx(\"p\", null, \"The following limitations generally apply to all server-side data scrubbing, be it basic Safe Fields usage or Advanced Data Scrubbing.\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Hashing, masking or replacing a JSON object, array or number (anything that is not a string) cannot be done in all circumstances as it would change the JSON type of the value and violate assumptions Sentry's internals make about the data schema. Data scrubbing will ignore the \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Method\"), \" in those cases and always remove/replace with \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"null\"), \" as that is always safe.\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Sentry's internals require that the event user's IP address must either be \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"null\"), \" or a valid IPv4/IPv6 address. If you're trying to hash, mask or replace IP addresses, data scrubbing will move the replacement value into the user ID (if one is not already set) in order to avoid breaking this requirement while still providing useful data for the Users count on an issue.\"))));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#a-basic-example","title":"A Basic Example"},{"url":"#methods","title":"Methods"},{"url":"#data-types","title":"Data Types"},{"url":"#sources","title":"Sources","items":[{"url":"#using-an-event-id-to-auto-complete-sources","title":"Using an event ID to auto-complete sources"},{"url":"#advanced-source-names","title":"Advanced source names"},{"url":"#boolean-logic","title":"Boolean Logic"},{"url":"#wildcards","title":"Wildcards"},{"url":"#value-types","title":"Value Types"},{"url":"#escaping-special-characters","title":"Escaping Special Characters"}]},{"url":"#known-limitations-of-server-side-data-scrubbing","title":"Known Limitations of server-side data scrubbing"}]},"internal":{"type":"Mdx"}}}},"pageContext":{"excerpt":"In addition to using  beforeSend  in your SDK or our  regular server-side data scrubbing features  to redact sensitive data, Advanced Data Scrubbing is an alternative way to redact sensitive information just before it is saved in Sentry. It allows you to: Define custom regular expressions to match on sensitive data Detailed tuning on which parts of an event to scrub Partial removal or hashing of sensitive data instead of deletion A Basic Example Go to your project- or organization-settings and click  Security and Privacy  in the sidebar. Scrolling down, you will find a new section  Advanced Data Scrubbing . Click on  Add Rule . You will be presented with a new dialog. Select  Mask  as  Method . Select  Credit card numbers  as  Data Type . Enter  $string  as  Source . As soon as you hit  Save , we will attempt to find all creditcard numbers in your events going forward, and replace them with a series of  ****** . For a more verbose tutorial check out  this blogpost . Rules generally consist of three parts: A  Method : What to do. A  Data Type : What to look for. A  Source : Where to look. Methods Remove : Remove the entire field. We may choose to either set it to  null , remove it entirely, or replace it with an empty string depending on technical constraints. Mask : Replace all characters with  * . Hash : Replace the matched substring with a hashed value. Replace : Replace the matched substring with a constant  placeholder  value (defaulting to  [Filtered] ). Data Types Regex Matches : Custom regular expression. For example:  [a-zA-Z0-9]+ . Some notes: Do not write  /[a-zA-Z0-9]+/g , as that will search for a literal  /  and  /g . For case-insensitivity, prefix your regex with  (?i) . If you're trying to use one of the popular regex \"IDEs\" like  regex101.com , Golang is usually closest to how Sentry understands your regex. Credit Card Numbers : Any substrings that look like credit card numbers. Password Fields : Any substrings that look like they may contain passwords. Any string that mentions passwords, auth tokens or credentials, any variable that is called  password  or  auth . IP Addresses : Any substrings that look like valid IPv4 or IPv6 addresses. IMEI Numbers : Any substrings that look like an IMEI or IMEISV. Email Addresses UUIDs PEM Keys : Any substrings that look like the content of a PEM-keyfile. Auth in URLs : Usernames and passwords in URLs like  https://user:pass@example.com/foo . US social security numbers : 9-digit social security numbers for the USA. Usernames in filepaths : For example  myuser  in  /Users/myuser/file.txt ,  C:/Users/myuser/file.txt ,  C:/Documents and Settings/myuser/file.txt ,  /home/myuser/file.txt , ... MAC Addresses Anything : Matches any value. This is useful if you want to remove a certain JSON key by path using  Sources  regardless of the value. Sentry does not know if a local variable that looks like a credit card number actually is one. As such, you need to expect not only false-positives but also false-negatives.  Sources  can help you in limiting the scope in which your rule runs. Sources Selectors allow you to restrict rules to certain parts of the event. This is useful to unconditionally remove certain data by event attribute, and can also be used to conservatively test rules on real data. A few examples: **  to scrub everything $error.value  to scrub in the exception message $message  to scrub the event-level log message extra.'My Value'  to scrub the key  My Value  in \"Additional Data\" extra.**  to scrub everything in \"Additional Data\" $http.headers.x-custom-token  to scrub the request header  X-Custom-Token $user.ip_address  to scrub the user's IP address $frame.vars.foo  to scrub a stack trace frame variable called  foo contexts.device.timezone  to scrub a key from the Device context tags.server_name  to scrub the tag  server_name All key names are treated case-insensitively. Using an event ID to auto-complete sources Above the  Source  input field you will find another input field for an event ID. Providing a value there allows for better auto-completion of arbitrary  Additional Data  fields and variable names. The event ID is purely optional and the value is not saved as part of your settings. Data scrubbing settings always apply to all new events within a project/organization (going forward). Advanced source names Data scrubbing always works on the raw event payload. Keep in mind that some fields in the UI may be called differently in the JSON schema. When looking at an event there should always be a link called \"JSON\" present that allows you to see what the data scrubber sees. For example, what is called \"Additional Data\" in the UI is called  extra  in the event payload. To remove a specific key called  foo , you would write: Another example. Sentry knows about two kinds of error messages: the exception message, and the top-level log message. Here is an example of how such an event payload as sent by the SDK (and downloadable from the UI) would look…","title":"Advanced Data Scrubbing","sidebar_order":4,"keywords":["pii","gdpr","personally identifiable data","compliance"],"platform":{"name":"dotnet","title":".NET"},"notoc":true,"id":"088650bf-1a0b-592c-87d6-6dc43de4d231"}},"staticQueryHashes":["1218203755","1222113826","1222113826","1766336459","2158593473","2404336828","2472290386","2764967025","3818502851","4015007367","4192517163","4264099332","518019976"]}