<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/from-one-switch-to-a-control-panel-meet-datacollection--shihprvmf" -->

---
title: From one switch to a control panel: meet `dataCollection`
description: Sentry is replacing the boolean sendDefaultPii option with a new granular dataCollection option across its SDKs. Instead of an all-or-nothing switch,...
canonical: https://daily.dev/posts/from-one-switch-to-a-control-panel-meet-datacollection--shihprvmf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: From one switch to a control panel: meet `dataCollection` | daily.dev
og:description: Sentry is replacing the boolean sendDefaultPii option with a new granular dataCollection option across its SDKs. Instead of an all-or-nothing switch,...
og:url: https://daily.dev/posts/from-one-switch-to-a-control-panel-meet-datacollection--shihprvmf
og:image: https://api.daily.dev/og/posts/ShIHprvmF.png
og:image:alt: From one switch to a control panel: meet `dataCollection`
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

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

**[Sentry Engineering](https://daily.dev/sources/sentry)** · 7 min read · 0 upvotes · 0 comments

## Summary

Sentry is replacing the boolean sendDefaultPii option with a new granular dataCollection option across its SDKs. Instead of an all-or-nothing switch, developers get separate dials for categories like user info, cookies, HTTP headers/bodies, GenAI inputs/outputs, and database query data. dataCollection has been available in JavaScript SDKs since v10.57.0, and Sentry JavaScript SDK v11 makes it the default, removing sendDefaultPii entirely. Crucially, the v11 defaults are more permissive than v10's restrictive baseline, so teams that previously left sendDefaultPii unset or false need to explicitly configure dataCollection options to preserve old behavior. The post also covers sensitive-data filtering (headers denylist), the new span streaming mode in v11 replacing beforeSendTransaction/ignoreTransactions with ignoreSpans and beforeSendSpan, and migration guidance for both prior sendDefaultPii settings.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.sentry.io/datacollection-control-panel>

## Questions this post answers

### What replaces the sendDefaultPii option in the Sentry JavaScript SDK v11?

Sentry v11 replaces the sendDefaultPii boolean with a new dataCollection option that lets you configure each data category separately, such as userInfo, cookies, httpHeaders, httpBodies, genAI, and databaseQueryData. dataCollection has been available since JavaScript SDK 10.57.0, but v11 makes it the default and removes sendDefaultPii entirely.

_Teams planning the Sentry v11 upgrade can track SDK breaking changes like this one on daily.dev._

### Will upgrading to Sentry JavaScript SDK v11 collect more data than v10 by default?

Yes, if sendDefaultPii was previously false or unset. The v11 dataCollection defaults are more permissive than the old restrictive v10 baseline: userInfo, cookies, httpHeaders, httpBodies, genAI data, and databaseQueryData all become collected by default, whereas most of these were off or scrubbed in v10. Developers who want the old restrictive behavior must explicitly set the corresponding dataCollection options to false.

_Developers auditing what data their monitoring tools collect can follow SDK default changes like this on daily.dev._

### How do I drop spans when using Sentry span streaming mode in v11?

Use ignoreSpans instead of beforeSendTransaction or ignoreTransactions, since neither of the older hooks works once streaming mode is enabled. Span streaming, on by default in v11, sends spans in batches as they finish rather than bundling them into one transaction; beforeSendSpan can still modify or redact span data but cannot drop spans.

_Anyone migrating span filtering logic during a Sentry upgrade can find guides like this via daily.dev._

## Similar posts on daily.dev

- [Sentry JavaScript SDK v11 adds tracing for all JS platforms](https://daily.dev/posts/sentry-javascript-sdk-v11-adds-tracing-for-all-js-platforms-w3nhnrm1k) · Sentry Engineering · 0 upvotes · 0 comments
- [Reduce sensitive data exposure with build-time allowlists](https://daily.dev/posts/reduce-sensitive-data-exposure-with-build-time-allowlists-bshmrhtp6) · Datadog · 0 upvotes · 0 comments
- [What Every Dev Should Know About Tracking Product Data](https://daily.dev/posts/what-every-dev-should-know-about-tracking-product-data-epok7yxnx) · freeCodeCamp · 1 upvotes · 0 comments
- [A Boolean PII Flag Is Not Enough](https://daily.dev/posts/a-boolean-pii-flag-is-not-enough-sixmzobum) · Tech Lead Digest · 0 upvotes · 0 comments
- [What Happens After Every Company Becomes a Data Company?](https://daily.dev/posts/what-happens-after-every-company-becomes-a-data-company--qojn0zqsi) · Nordic APIs · 0 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#privacy](https://daily.dev/tags/privacy), [#observability](https://daily.dev/tags/observability)

[View this post on daily.dev](https://daily.dev/posts/from-one-switch-to-a-control-panel-meet-datacollection--shihprvmf)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"From one switch to a control panel: meet `dataCollection`","url":"https://daily.dev/posts/from-one-switch-to-a-control-panel-meet-datacollection--shihprvmf","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/from-one-switch-to-a-control-panel-meet-datacollection--shihprvmf"},"datePublished":"2026-08-28T16:53:32.284Z","dateModified":"2026-08-28T16:53:58.831Z","description":"Sentry is replacing the boolean sendDefaultPii option with a new granular dataCollection option across its SDKs. Instead of an all-or-nothing switch,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/296b362098ff5a284e7399a1af282374?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/296b362098ff5a284e7399a1af282374?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Sentry Engineering","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Sentry Engineering","logo":"https://media.daily.dev/image/upload/s--qqXwMThM--/f_auto/v1710505439/logos/sentry","url":"https://daily.dev/sources/sentry"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/from-one-switch-to-a-control-panel-meet-datacollection--shihprvmf","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript,privacy,observability","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sentry Engineering","item":"https://daily.dev/sources/sentry"},{"@type":"ListItem","position":3,"name":"From one switch to a control panel: meet `dataCollection`"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/from-one-switch-to-a-control-panel-meet-datacollection--shihprvmf#faq","mainEntity":[{"@type":"Question","name":"What replaces the sendDefaultPii option in the Sentry JavaScript SDK v11?","acceptedAnswer":{"@type":"Answer","text":"Sentry v11 replaces the sendDefaultPii boolean with a new dataCollection option that lets you configure each data category separately, such as userInfo, cookies, httpHeaders, httpBodies, genAI, and databaseQueryData. dataCollection has been available since JavaScript SDK 10.57.0, but v11 makes it the default and removes sendDefaultPii entirely. Teams planning the Sentry v11 upgrade can track SDK breaking changes like this one on daily.dev."}},{"@type":"Question","name":"Will upgrading to Sentry JavaScript SDK v11 collect more data than v10 by default?","acceptedAnswer":{"@type":"Answer","text":"Yes, if sendDefaultPii was previously false or unset. The v11 dataCollection defaults are more permissive than the old restrictive v10 baseline: userInfo, cookies, httpHeaders, httpBodies, genAI data, and databaseQueryData all become collected by default, whereas most of these were off or scrubbed in v10. Developers who want the old restrictive behavior must explicitly set the corresponding dataCollection options to false. Developers auditing what data their monitoring tools collect can follow SDK default changes like this on daily.dev."}},{"@type":"Question","name":"How do I drop spans when using Sentry span streaming mode in v11?","acceptedAnswer":{"@type":"Answer","text":"Use ignoreSpans instead of beforeSendTransaction or ignoreTransactions, since neither of the older hooks works once streaming mode is enabled. Span streaming, on by default in v11, sends spans in batches as they finish rather than bundling them into one transaction; beforeSendSpan can still modify or redact span data but cannot drop spans. Anyone migrating span filtering logic during a Sentry upgrade can find guides like this via daily.dev."}}]}
```

