Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,47 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
- `Scope.iter_headers` was removed.
- The SDK won't set any tags on its own anymore.

## Migration

### Migrating from `send_default_pii` to `data_collection`
Comment thread
ericapisani marked this conversation as resolved.

The new `data_collection` defaults collect more data than `send_default_pii` did. User identity, generative AI content, HTTP request/response bodies, and file paths are now on by default, and more HTTP headers and cookies are collected.

If you wish to restrict data collection to roughly match the previous behaviour of `send_default_pii=False`, you can use the following configuration:

```python
sentry_sdk.init(
data_collection={
"user_info": False,
"http_bodies": [],
"graphql": {
"document": False,
"variables": False,
},
"gen_ai": {
"inputs": False,
"outputs": False,
},
"mcp": {
"inputs": False,
"outputs": False,
},
"database_query_data": False,
"queues": False,
"http_headers": {
"request": {
"mode": "denylist",
"terms": ["forwarded", "-ip", "remote-", "via", "-user"]
},
},
"cookies": { "mode": "denylist", "terms": ["forwarded", "-ip", "remote-", "via", "-user"] },
"url_query_params": {
"mode": "denylist", "terms": ["forwarded", "-ip", "remote-", "via", "-user"],
},
},
)
```

---------------------------------------------------------------------------------

# Sentry SDK 2.0 Migration Guide
Expand Down
Loading