Skip to content
Open
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
13 changes: 12 additions & 1 deletion develop-docs/sdk/foundations/client/data-collection/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
title: Data Collection
description: Configuration for what data SDKs collect by default, including technical context, PII, and sensitive data.
spec_id: sdk/foundations/client/data-collection
spec_version: 0.6.0
spec_version: 0.7.0
spec_status: candidate
spec_depends_on:
- id: sdk/foundations/client
version: ">=1.0.0"
spec_changelog:
- version: 0.7.0
date: 2026-07-03
summary: Include configuration for queue arguments.
- version: 0.6.0
date: 2026-06-29
summary: Include configuration for database queries.
Expand Down Expand Up @@ -77,6 +80,7 @@ Personally Identifiable Information (PII) or user-linked data. Examples include,
- IP address
- Cookies and headers that identify the user or session
- HTTP request data or database query parameters (TBD)
- Arguments passed to tasks within a queue

For context types that may carry PII fields (e.g. `device_unique_identifier` in [Device Context](/sdk/foundations/transport/event-payloads/contexts/#device-context), or fields in the [User Interface](/sdk/foundations/transport/event-payloads/user/)), see the linked specs.

Expand Down Expand Up @@ -543,6 +547,9 @@ init({
database?: {
queryParams?: boolean // default: true
},
queues?: {
taskArguments?: boolean // default: true

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting this in a dict may be overkill - can we foresee any other data collection controls we may want to add in the context of queues? If it's just task arguments I can update this to just be a boolean

},
stackFrameVariables?: boolean, // default: true
frameContextLines?: integer, // default: 5 (see boolean fallback below)
},
Expand All @@ -559,6 +566,7 @@ init({
| `graphql` | `{ document?, variables? }` | Both `true` | 0.5.0 | For `document`: Collect the GraphQL document. <br /><br /> For `variables`: Collect the variables that are passed to GraphQL operations. |
| `genAI` | `{ inputs?, outputs? }` | Both `true` | 0.1.0 | For `inputs`: Include the content of generative AI inputs (e.g. prompt text, tool call arguments). <br /><br /> For `outputs`: Include the content of generative AI outputs (e.g. completion text, tool call results). Metadata such as model name and token counts is always collected regardless of these settings. |
| `database` | `{ queryParams? }` | `true` | 0.6.0 | Include parameters/arguments passed to database queries. Setting this to false will either omit the value altogether, or replace the value with '[Filtered]'. |
| `queues` | `{ taskArguments? }` | `true` | 0.7.0 | Include arguments passed to tasks within queues. Setting this to false will replace the value with '[Filtered]'. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The documentation for queues.taskArguments describes a different behavior for disabling data collection compared to the similar database.queryParams option, which could lead to inconsistent SDK implementations.
Severity: MEDIUM

Suggested Fix

Align the behavior description for queues.taskArguments with database.queryParams. Either allow both omitting the value and replacing it with '[Filtered]', or explicitly justify in the documentation why the behavior for queues is intentionally more restrictive.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: develop-docs/sdk/foundations/client/data-collection/index.mdx#L569

Potential issue: The documentation for the new `queues.taskArguments` option states that
setting it to `false` will "replace the value with '[Filtered]'", which is inconsistent
with the existing `database.queryParams` option. The description for
`database.queryParams` says that setting it to `false` will "either omit the value
altogether, or replace the value with '[Filtered]'”. This inconsistency in the
specification for similar features risks different implementations across SDKs, leading
to a confusing and inconsistent experience for developers using different Sentry SDKs.

| `stackFrameVariables` | Boolean | `true` | 0.1.0 | Include local variable values captured within stack frames. |
| `frameContextLines` | Integer (`Boolean` fallback) | `5` (`true`) | 0.1.0 | Number of source code lines to include above and below each stack frame. <br/> **`Boolean` fallback:** Not all platforms support integer configuration values. SDKs **MAY** accept a boolean, where `true` is equivalent to the platform default (typically `5`) and `false` is equivalent to `0` (no context lines). SDKs **SHOULD** prefer accepting an integer when their platform supports it. |

Expand Down Expand Up @@ -665,6 +673,9 @@ init({
database: {
queryParams: false,
},
queues: {
taskArguments: false // default: true
},
httpHeaders: { deny: ["forwarded", "-ip", "remote-", "via", "-user"] },
cookies: { deny: ["forwarded", "-ip", "remote-", "via", "-user"] },
queryParams: { deny: ["forwarded", "-ip", "remote-", "via", "-user"] },
Expand Down
Loading