Skip to content

Commit af3200e

Browse files
committed
restore example
1 parent 1c22b68 commit af3200e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/security-legal-pii/scrubbing/advanced-datascrubbing.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ Sentry does not know if a local variable that looks like a credit card number ac
7676
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:
7777

7878
- `**` to scrub [all default event PII fields](/security-legal-pii/scrubbing//server-side-scrubbing/event-pii-fields/) (other fields, like the span description, require specific selectors)
79+
- `$error.value` to scrub in the exception message
7980
- `$message` to scrub the event-level log message
8081
- `extra.'My Value'` to scrub the key `My Value` in "Additional Data"
8182
- `extra.**` to scrub everything in "Additional Data"
@@ -103,6 +104,31 @@ For example, what is called "Additional Data" in the UI is called `extra` in the
103104
[Remove] [Anything] from [extra.foo]
104105
```
105106

107+
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:
108+
109+
```json
110+
{
111+
"logentry": {
112+
"formatted": "Failed to roll out the dinglebop"
113+
},
114+
"exception": {
115+
"values": [
116+
{
117+
"type": "ZeroDivisionError",
118+
"value": "integer division or modulo by zero"
119+
}
120+
]
121+
}
122+
}
123+
```
124+
125+
Since the "error message" is taken from the `exception`'s `value`, and the "message" is taken from `logentry`, we would have to write the following to remove both from the event:
126+
127+
```
128+
[Remove] [Anything] from [exception.values.*.value]
129+
[Remove] [Anything] from [logentry.formatted]
130+
```
131+
106132
### Boolean Logic
107133

108134
You can combine sources using boolean logic.

0 commit comments

Comments
 (0)