Skip to content

docs(python): Add data_collection alternatives to integration docs - #20128

Merged
sentrivana merged 4 commits into
masterfrom
ivana/python-data-collection-integrations
Oct 21, 2026
Merged

sentrivana merged 4 commits into
masterfrom
ivana/python-data-collection-integrations

Conversation

@sentrivana

@sentrivana sentrivana commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

DESCRIBE YOUR PR

The Python integration and agent tracing pages only describe send_default_pii. This adds the data_collection alternative, naming the specific key that controls each behavior.

  • Web framework pages: mention data_collection next to send_default_pii
  • Django, Flask: user_info
  • Redis, PyMongo, clickhouse-driver: database_query_data
  • GQL, Graphene, Ariadne, Strawberry: graphql and http_bodies (also fixes a typo on the Strawberry page claiming body capture was on by default)
  • MCP and agent tracing pages: gen_ai, and that include_prompts is ignored when data_collection is set
  • Rust Tracing: data_collection doesn't affect include_tracing_fields
  • Data Collected: outgoing_response is a valid http_bodies type and part of the default (used by Ariadne and Strawberry)
  • Mention data_collection before send_default_pii everywhere, and note that send_default_pii will be removed in version 3.0 of the SDK (also updates Options, Data Collected and Sensitive Data, which said it would only be deprecated eventually)
  • AI pages and Data Collected: clarify that prompts, messages, and responses aren't recorded by default, but some tool data is (tool definitions, LangChain and Google GenAI tool calls, MCP arguments), and how to remove it

Init snippets still use send_default_pii=True; that'll be handled separately.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace YYYY-MM-DD with the due date. You can update this information later by editing the PR description.

  • Urgent deadline (GA date, etc.): YYYY-MM-DD
  • Other deadline: YYYY-MM-DD
  • No deadline: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've supplied a deadline.

Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

Integration and AI agent pages only described send_default_pii. Document
the data_collection key that controls each behavior instead:

- Web frameworks: mention data_collection next to send_default_pii
- Django, Flask: user_info
- Redis, PyMongo, clickhouse-driver: database_query_data
- GQL, Graphene, Ariadne, Strawberry: graphql and http_bodies
- MCP and agent tracing: gen_ai, and that include_prompts is ignored
  when data_collection is set
- Rust Tracing: data_collection doesn't affect include_tracing_fields

Also fix the http_bodies docs in Data Collected: outgoing_response is a
valid body type and part of the default.
@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-docs Ready Ready Preview Oct 21, 2026 12:09pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
develop-docs Ignored Ignored Preview Oct 21, 2026 12:09pm UTC

Request Review

… removal

Wherever a page mentions both options, describe data_collection first
and send_default_pii as the alternative, and note that send_default_pii
will be removed in the next major version of the SDK.

Also update the Options, Data Collected and Sensitive Data pages, which
said send_default_pii would only be deprecated eventually.
@sentrivana sentrivana changed the title docs(python): Add data_collection alternatives to integration docs docs(python): Add data_collection alternatives to integration docs Oct 21, 2026
@sentrivana
sentrivana marked this pull request as ready for review October 21, 2026 12:00
@codeowner-assignment
codeowner-assignment Bot requested a review from a team October 21, 2026 12:01
@cursor

cursor Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

The change documents a new Python SDK option on existing pages. An issue escalates when those pages 404 or throw client errors. Page load volume on the changed paths is the population for those checks.

Rollout complete

Services: sentry-docs.

Plan

What changed

Python docs pages now describe data_collection and say some AI tool data is collected by default. They still mention send_default_pii and say SDK 3.0 will remove it. sentry-docs must deploy before this wording is live. Vercel production maps this repo to sentry-docs. The change does not add routes.

Risk

Broken MDX can 404 a page or throw in the browser. That reaches readers of the changed Python pages. Shared layout code did not change. A failed Vercel build would block the ship. Wrong default-collection wording can hide that tool arguments are sent. That SDK effect is not visible on this site.

Intended effect

This is a docs wording change. No counter increments when the new text is live. Absence looks like the pages still loading with only send_default_pii copy. Absence also looks like AI pages omitting the default tool-data note. Telemetry cannot confirm the new wording.

Regression watch

Watch the changed Python docs paths. Pair each failure signal with docs.page.load on those paths. Existing Algolia insights fetch TypeErrors are noise. Do not count them as this change. 2026-10-18 had a 53% error rate. Treat that day as an outlier.

Signal Baseline Window Rule Source
Python page 404 rate 0-1.7% of loads. 24h was 0.68% (5 / 739). Daily rates 2026-10-14 to 2026-10-20. 24h 2026-10-20T12:01:47Z to 2026-10-21T12:01:47Z Hold in 0-1.7% of docs.page.load Sentry org sentry project docs. docs.page.not_found with environment:production requested_path:platforms/python. Denominator docs.page.load with environment:production page_type:platforms path:*platforms/python*
Python page error rate Typical 0-2.7% of loads. 24h was 0.95% (7 / 739). 2026-10-18 was 53% Daily rates 2026-10-14 to 2026-10-20. 24h 2026-10-20T12:01:47Z to 2026-10-21T12:01:47Z Hold in 0-2.7% of docs.page.load. A new spike like 2026-10-18 is detected Sentry org sentry project docs. Errors with environment:production http.url:*platforms/python*. Same docs.page.load denominator. 24h titles were 6 Algolia fetch TypeErrors and 1 undefined property TypeError
MDX missing-file logs 0 events 2026-10-20T12:01:47Z to 2026-10-21T12:01:47Z Hold at 0 Sentry org sentry project docs. Logs with environment:production message:"*MDX file not found*"

If the error rate rises, inspect new titles on those URLs. Ignore Algolia insights fetch failures.

Not observable

Live HTML for the new data_collection wording is not in telemetry. The 7-day pageload failure-rate series timed out in Sentry. Traces are sampled at 30% and cannot form a band here.

Without send_default_pii or data_collection, AI integrations don't record
prompts, messages, or responses, but some still attach tool data: tool
definitions, LangChain and Google GenAI tool calls, and MCP tool and
prompt arguments. Document this per integration, along with how to
remove it with data_collection's gen_ai key.

Google GenAI tool inputs and outputs are attached regardless of either
option, so note that as well.
@sentrivana
sentrivana enabled auto-merge (squash) October 21, 2026 12:03
@sentrivana
sentrivana merged commit 2bd643f into master Oct 21, 2026
27 checks passed
@sentrivana
sentrivana deleted the ivana/python-data-collection-integrations branch October 21, 2026 12:13
sentrivana added a commit that referenced this pull request Oct 21, 2026
## DESCRIBE YOUR PR

Replace `send_default_pii=True` in Python init snippets with a
`data_collection` example, using the key that fits each page.
`send_default_pii` will be removed in version 3.0 of the SDK.

- `user_info`: shared getting-started/config includes, general pages,
web frameworks, logging, feature flags, etc.
- `gen_ai`: AI agent tracing pages and MCP
- `queues`: Celery, RQ
- `database_query_data`: aiomysql
- `graphql`: Strawberry

Snippets demonstrating `include_prompts`, `event_scrubber`, or Rust
Tracing's `include_tracing_fields` keep `send_default_pii`, since those
only work with it. The GQL, Graphene, Ariadne, and second Strawberry
snippets are left alone because #20128 keeps them as the
`send_default_pii` alternative.

Related: #20128

## IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
Select exactly one option. For deadlines, replace `YYYY-MM-DD` with the
due date. You can update this information later by editing the PR
description.

- [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD
- [ ] Other deadline: YYYY-MM-DD
- [x] No deadline: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
supplied a deadline.

Thanks in advance for your help!

## PRE-MERGE CHECKLIST

_Make sure you've checked the following before merging your changes:_

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
sentrivana added a commit that referenced this pull request Oct 21, 2026
…20131)

## DESCRIBE YOUR PR

The manual AI and MCP instrumentation pages implied that prompt,
response, and tool content you set yourself is only captured with
`send_default_pii=True`. The SDK doesn't filter manually set attributes
based on `send_default_pii` or `data_collection`, so this updates the
pages to say that.

- Manual Instrumentation: replace the `send_default_pii` claim, and
point the privacy reference at `data_collection`
- MCP custom instrumentation: align the tool-argument comment with the
prompt examples on the same page

Related: #20128

## IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
Select exactly one option. For deadlines, replace `YYYY-MM-DD` with the
due date. You can update this information later by editing the PR
description.

- [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD
- [ ] Other deadline: YYYY-MM-DD
- [x] No deadline: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
supplied a deadline.

Thanks in advance for your help!

## PRE-MERGE CHECKLIST

_Make sure you've checked the following before merging your changes:_

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
@cursor

cursor Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Verified in production

  • Python docs pages serve the new data_collection wording, and 404s and errors stayed in band.

This branch was successfully deployed

1 active deployment
Preview – sentry-docs — 2e79bfd2 Deployed Oct 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Normal Docs review has no urgent deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants