Skip to content

Commit 55babfa

Browse files
committed
fix
1 parent 461b029 commit 55babfa

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

BEFORE_SEND.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,22 @@ def normalize_event_names(event: dict[str, Any]) -> Optional[dict[str, Any]]:
117117
return event
118118
```
119119

120-
### 5. Combined Processing
120+
### 5. Log and drop in "dev" mode
121+
122+
When running in local dev often, you want to log but drop all events
123+
124+
125+
```python
126+
from typing import Optional, Any
127+
128+
def log_and_drop_all(event: dict[str, Any]) -> Optional[dict[str, Any]]:
129+
"""Convert event names to a consistent format."""
130+
print(event)
131+
132+
return None
133+
```
134+
135+
### 6. Combined Processing
121136

122137
```python
123138
from typing import Optional, Any
@@ -162,6 +177,7 @@ def risky_before_send(event: dict[str, Any]) -> Optional[dict[str, Any]]:
162177
risky_operation()
163178
return event
164179
```
180+
165181
## Complete Example
166182

167183
```python

0 commit comments

Comments
 (0)