Skip to content

docs(python): Clarify that manual AI span attributes aren't filtered - #20131

Merged
sentrivana merged 1 commit into
masterfrom
ivana/python-manual-ai-pii-docs
Oct 21, 2026
Merged

sentrivana merged 1 commit into
masterfrom
ivana/python-manual-ai-pii-docs

Conversation

@sentrivana

Copy link
Copy Markdown
Contributor

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
  • 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

The manual AI and MCP instrumentation pages implied that prompt, response,
and tool content set by hand 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 say that instead.
@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:29pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
develop-docs Ignored Ignored Preview Oct 21, 2026 12:29pm UTC

Request Review

@github-actions github-actions Bot added the Priority: Normal Docs review has no urgent deadline label Oct 21, 2026
@codeowner-assignment
codeowner-assignment Bot requested a review from a team October 21, 2026 12:22
@sentrivana
sentrivana marked this pull request as ready for review October 21, 2026 12:23
@cursor

cursor Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

The change tells readers that hand-set span attributes are not filtered. The plan checks client errors on the two changed pages and client errors on Python pages. An issue escalates when those page errors leave zero or Python page errors rise.

Rollout complete

Services: sentry-docs.

Plan

What changed

Two Python pages now say the SDK does not filter hand-set span attributes. data_collection and send_default_pii do not apply to those attributes. sentry-docs must deploy to production before this copy is live. This change relates to issues/20128.

Risk

Readers may send PII in hand-set attributes after they follow the new copy. A bad MDX render can fail those two pages. Code comments in fenced blocks can break code tabs. Other Python pages share the same catch-all route. The JavaScript manual instrumentation page shares the manual-instrumentation URL tail and is not in this diff.

Intended effect

Telemetry cannot see the new sentences. Confirm the live HTML after deploy. Absent means the old send_default_pii capture claim is still on the page while the page still loads.

Signal Baseline Rule Source
Production GET of /platforms/python/agent-tracing/manual-instrumentation/ The page says prompt, response, and tool content are captured only when send_default_pii=True. Measured at 2026-10-21T12:23Z. The page must say the SDK does not filter attributes you set manually. Absent: the old capture claim remains. Production HTML
Production GET of /platforms/python/tracing/instrumentation/custom-instrumentation/mcp-module/ Tool-argument comments say optional, if send_default_pii=True. Measured at 2026-10-21T12:23Z. Comments must say set tool arguments only if PII is acceptable. Absent: the old comment remains. Production HTML

Sampled middleware volume on the MCP page was 300 spans in the 48h window 2026-10-19T12:23:53Z to 2026-10-21T12:23:53Z. That volume shows the page is reached. It does not prove the new copy.

Regression watch

A render or code-tab break on these pages would show as client errors on the same URLs. Watch Python page errors as the sibling path on the same route.

Signal Baseline Rule Source
Client error events, environment:production AND url:*mcp-module* 0 events in 24h and 0 events in 48h. Pair with 300 sampled middleware GET spans on that URL in 48h. Error share 0%. Window 2026-10-19T12:23:53Z to 2026-10-21T12:23:53Z. Hold at 0. Sentry org sentry, project docs
Client error events, environment:production AND url:*manual-instrumentation* 0 events in 24h and 0 events in 48h. Pair with 2100 sampled middleware GET spans in 48h. Error share 0%. This URL tail also matches the JavaScript sibling page. Window 2026-10-19T12:23:53Z to 2026-10-21T12:23:53Z. Hold at 0. Sentry org sentry, project docs
Client error events, environment:production AND url:*/platforms/python/* 7 events in 2026-10-20T12:23:53Z to 2026-10-21T12:23:53Z. 14 events in 2026-10-19T12:23:53Z to 2026-10-21T12:23:53Z. Prior 24h is also 7. Hold in 7-7 events per 24h. Escalate if a 24h count rises above 7. Sentry org sentry, project docs

Client traces sample at 30%. Middleware span counts are sampled. Error events are not.

Not observable

The Python-only page-view rate for /platforms/python/agent-tracing/manual-instrumentation/ was not measured. The working trace query also matches the JavaScript sibling page. The 24h split for MCP page volume was not measured. Only the 48h middleware total of 300 is available. The Python page error watch has no page-view denominator, so its pre-ship rate is missing. Whether readers change what PII they set is not in telemetry. An HTTP 5xx query for these URLs returned no rows, so server failure status on this path is unproven.

@sentrivana
sentrivana enabled auto-merge (squash) October 21, 2026 12:25
@sentrivana
sentrivana merged commit d8a2c92 into master Oct 21, 2026
28 checks passed
@sentrivana
sentrivana deleted the ivana/python-manual-ai-pii-docs branch October 21, 2026 12:30
@cursor

cursor Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Verified in production

  • Both live Python pages show the new hand-set attribute copy, and those pages logged no client errors.

This branch was successfully deployed

1 active deployment
Preview – sentry-docs — 56593951 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