---
title: "From one switch to a control panel: meet `dataCollection`"
description: "Sentry is replacing the JavaScript SDK boolean option sendDefaultPii with dataCollection, a category-level control for automatically collected data. In version 11, dataCollection becomes the default, sendDefaultPii is removed, and several categories—including user information, cookies, HTTP bodies, GenAI inputs and outputs, database query data, and stack-frame variables—are collected by default. The post distinguishes PII, which is collected by default, from sensitive credentials, whose values in collected headers are filtered automatically; manually attached data remains unaffected. Developers can preserve v10’s restrictive baseline or select true, false, allow lists, and deny lists for supported fields, while beforeSend and beforeSendSpan handle additional filtering. Because v11 also enables span streaming by default, span drops move to ignoreSpans, and existing withStreamedSpan wrappers should be removed."
---

# From one switch to a control panel: meet \`dataCollection\`

[Sentry](https://yomu.fyi/company/sentry) · Sigrid Huemer · Aug 28, 2026

**Type:** Explainer

## Summary

Sentry is replacing the JavaScript SDK boolean option sendDefaultPii with dataCollection, a category-level control for automatically collected data. In version 11, dataCollection becomes the default, sendDefaultPii is removed, and several categories—including user information, cookies, HTTP bodies, GenAI inputs and outputs, database query data, and stack-frame variables—are collected by default. The post distinguishes PII, which is collected by default, from sensitive credentials, whose values in collected headers are filtered automatically; manually attached data remains unaffected. Developers can preserve v10’s restrictive baseline or select true, false, allow lists, and deny lists for supported fields, while beforeSend and beforeSendSpan handle additional filtering. Because v11 also enables span streaming by default, span drops move to ignoreSpans, and existing withStreamedSpan wrappers should be removed.

## Context

The boolean sendDefaultPii option could only enable or disable broad collection, making it impossible to collect one useful category while excluding another. JavaScript SDK v11 also changes the default behavior: dataCollection collects more categories than an unset or false sendDefaultPii did in v10, requiring review before upgrading.

## Approach / What changed

dataCollection provides category-level controls for automatically collected data, including booleans, allow lists, and deny lists for supported fields. Existing event and span hooks handle more specific filtering: beforeSend can modify or drop error events, beforeSendSpan can modify spans, and ignoreSpans can drop spans in v11 streaming mode.

## Takeaways

- With JavaScript SDK v11, an unset dataCollection collects more than the previous restrictive v10 default, including request and response bodies, user information, cookies, GenAI inputs and outputs, and database query data.
- Manually attached data is still sent even when its category is disabled; for example, setting userInfo to false does not prevent explicitly supplied data from Sentry.setUser(...) from being sent.
- Span streaming is enabled by default in v11. Span modifications use beforeSendSpan, span drops use ignoreSpans, and beforeSendTransaction or ignoreTransactions are unavailable once streaming is active.

**Tags:** [Migrations](https://yomu.fyi/topic/migration), [Observability](https://yomu.fyi/topic/observability), [Privacy](https://yomu.fyi/topic/privacy)

- Source: [Sentry](https://blog.sentry.io/datacollection-control-panel)
- Source URL: https://blog.sentry.io/datacollection-control-panel
- Ingested by Yomu: 2026-08-28T20:00:46.413Z

[Read original post](https://blog.sentry.io/datacollection-control-panel)
