From a1857c3de65fcdd180a88874d83075654f9e0e5c Mon Sep 17 00:00:00 2001 From: Daniel Griesser Date: Mon, 18 May 2026 11:28:58 +0200 Subject: [PATCH 1/4] docs(skills): recommend send default PII Recommend each SDK's send-default-PII option where privacy policy and user disclosures permit, while documenting that the current Elixir SDK has no matching config option. Update AI monitoring guidance to rely on sendDefaultPii/send_default_pii for prompt and output capture defaults, keeping recordInputs/recordOutputs/include_prompts for explicit overrides. Co-Authored-By: OpenAI Codex --- skills/sentry-android-sdk/SKILL.md | 2 +- skills/sentry-browser-sdk/SKILL.md | 2 +- skills/sentry-cloudflare-sdk/SKILL.md | 2 +- skills/sentry-cocoa-sdk/SKILL.md | 2 +- skills/sentry-dotnet-sdk/SKILL.md | 2 +- skills/sentry-elixir-sdk/SKILL.md | 4 ++ skills/sentry-flutter-sdk/SKILL.md | 2 +- skills/sentry-go-sdk/SKILL.md | 2 +- skills/sentry-nestjs-sdk/SKILL.md | 2 +- .../references/ai-monitoring.md | 46 ++++++-------- skills/sentry-nextjs-sdk/SKILL.md | 2 +- .../references/ai-monitoring.md | 53 +++++++--------- skills/sentry-node-sdk/SKILL.md | 2 +- .../references/ai-monitoring.md | 23 ++++--- skills/sentry-php-sdk/SKILL.md | 2 +- skills/sentry-python-sdk/SKILL.md | 2 +- .../references/ai-monitoring.md | 9 ++- skills/sentry-react-native-sdk/SKILL.md | 2 +- .../SKILL.md | 2 +- skills/sentry-react-sdk/SKILL.md | 2 +- skills/sentry-ruby-sdk/SKILL.md | 2 +- skills/sentry-setup-ai-monitoring/SKILL.md | 61 +++++++++++-------- skills/sentry-svelte-sdk/SKILL.md | 2 +- skills/sentry-tanstack-start-sdk/SKILL.md | 2 +- 24 files changed, 121 insertions(+), 111 deletions(-) diff --git a/skills/sentry-android-sdk/SKILL.md b/skills/sentry-android-sdk/SKILL.md index 64eeb53..8f6e91f 100644 --- a/skills/sentry-android-sdk/SKILL.md +++ b/skills/sentry-android-sdk/SKILL.md @@ -570,7 +570,7 @@ The plugin can inject instrumentation automatically (no source changes): | `environment` | `String` | — | e.g., `"production"`, `"staging"`. Env: `SENTRY_ENVIRONMENT` | | `release` | `String` | — | App version, e.g., `"my-app@1.0.0+42"`. Env: `SENTRY_RELEASE` | | `dist` | `String` | — | Build variant / distribution identifier | -| `sendDefaultPii` | `Boolean` | `false` | Include PII: IP address, user data | +| `sendDefaultPii` | `Boolean` | `false` | Recommended when privacy disclosures permit; includes IP address and user data | | `sampleRate` | `Double` | `1.0` | Error event sampling (0.0–1.0) | | `maxBreadcrumbs` | `Int` | `100` | Max breadcrumbs per event | | `isAttachStacktrace` | `Boolean` | `true` | Auto-attach stack traces to message events | diff --git a/skills/sentry-browser-sdk/SKILL.md b/skills/sentry-browser-sdk/SKILL.md index 4420649..0a503fb 100644 --- a/skills/sentry-browser-sdk/SKILL.md +++ b/skills/sentry-browser-sdk/SKILL.md @@ -531,7 +531,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `dsn` | `string` | — | **Required.** SDK disabled when empty | | `environment` | `string` | `"production"` | e.g., `"staging"`, `"development"` | | `release` | `string` | — | e.g., `"my-app@1.0.0"` or git SHA — links errors to releases | -| `sendDefaultPii` | `boolean` | `false` | Includes IP addresses and request headers | +| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; includes IP addresses/request headers and enables PII-gated AI input/output capture where supported | | `tracesSampleRate` | `number` | — | 0–1; `1.0` in dev, `0.1–0.2` in prod | | `tracesSampler` | `function` | — | Per-transaction sampling; overrides rate | | `tracePropagationTargets` | `(string\|RegExp)[]` | same-origin | Outgoing URLs that receive distributed tracing headers | diff --git a/skills/sentry-cloudflare-sdk/SKILL.md b/skills/sentry-cloudflare-sdk/SKILL.md index 9d5fbf4..8a4bec5 100644 --- a/skills/sentry-cloudflare-sdk/SKILL.md +++ b/skills/sentry-cloudflare-sdk/SKILL.md @@ -427,7 +427,7 @@ Deploy and trigger the route, then check your [Sentry Issues dashboard](https:// | `dsn` | `string` | — | Required. Read from `env.SENTRY_DSN` automatically if not set | | `tracesSampleRate` | `number` | — | 0–1; 1.0 in dev, lower in prod recommended | | `tracesSampler` | `function` | — | Dynamic sampling function; mutually exclusive with `tracesSampleRate` | -| `sendDefaultPii` | `boolean` | `false` | Include request headers and cookies in events | +| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; includes request headers/cookies and enables PII-gated AI input/output capture where supported | | `enableLogs` | `boolean` | `false` | Enable Sentry Logs product | | `environment` | `string` | auto | Read from `env.SENTRY_ENVIRONMENT` if not set | | `release` | `string` | auto | Detected from `CF_VERSION_METADATA.id` or `SENTRY_RELEASE` | diff --git a/skills/sentry-cocoa-sdk/SKILL.md b/skills/sentry-cocoa-sdk/SKILL.md index 60628cf..f01853c 100644 --- a/skills/sentry-cocoa-sdk/SKILL.md +++ b/skills/sentry-cocoa-sdk/SKILL.md @@ -283,7 +283,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `environment` | `String` | `""` | e.g., `"production"`; reads `SENTRY_ENVIRONMENT` | | `releaseName` | `String` | `""` | e.g., `"my-app@1.0.0"`; reads `SENTRY_RELEASE` | | `debug` | `Bool` | `false` | Verbose SDK output — **disable in production** | -| `sendDefaultPii` | `Bool` | `false` | Include IP, user info from active integrations | +| `sendDefaultPii` | `Bool` | `false` | Recommended when privacy disclosures permit; includes IP and user info from active integrations | | `enableCrashHandler` | `Bool` | `true` | Master switch for crash reporting | | `enableAppHangTrackingV2` | `Bool` | `true` (9.0+) | Differentiates fully/non-fully blocked hangs | | `appHangTimeoutInterval` | `Double` | `2.0` | Seconds before classifying as hang | diff --git a/skills/sentry-dotnet-sdk/SKILL.md b/skills/sentry-dotnet-sdk/SKILL.md index 7b4b4fb..fb5fe70 100644 --- a/skills/sentry-dotnet-sdk/SKILL.md +++ b/skills/sentry-dotnet-sdk/SKILL.md @@ -514,7 +514,7 @@ Then check your [Sentry Issues dashboard](https://sentry.io/issues/) — the err | `TracesSampleRate` | `double` | `0.0` | — | Transaction sampling. Must be `> 0` to enable. | | `TracesSampler` | `Func` | — | — | Per-transaction dynamic sampler; overrides `TracesSampleRate` | | `ProfilesSampleRate` | `double` | `0.0` | — | Fraction of traced transactions to profile. Requires `Sentry.Profiling`. | -| `SendDefaultPii` | `bool` | `false` | — | Include user IP, name, email | +| `SendDefaultPii` | `bool` | `false` | — | Recommended when privacy disclosures permit; includes user IP, name, and email | | `AttachStacktrace` | `bool` | `true` | — | Attach stack trace to all messages | | `MaxBreadcrumbs` | `int` | `100` | — | Max breadcrumbs stored per event | | `IsGlobalModeEnabled` | `bool` | `false`* | — | *Auto-`true` for MAUI, Blazor WASM. **Must** be `true` for WPF, WinForms, Console. | diff --git a/skills/sentry-elixir-sdk/SKILL.md b/skills/sentry-elixir-sdk/SKILL.md index ac7b28c..5920a34 100644 --- a/skills/sentry-elixir-sdk/SKILL.md +++ b/skills/sentry-elixir-sdk/SKILL.md @@ -289,6 +289,10 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `:enable_logs` | `boolean` | `false` | Enable Sentry Logs Protocol (v12.0.0+) | | `:test_mode` | `boolean` | `false` | Capture events in-memory for testing | +### Default PII Guidance + +Most Sentry SDKs expose a send-default-PII option that should be recommended when privacy policy and user disclosures permit. As of sentry v12, the Elixir SDK does not expose a `send_default_pii` config option in its documented option list or current config schema, so do **not** add a non-existent option. For richer user context, use `Sentry.PlugContext` and explicitly set allowed fields with `Sentry.Context.set_user_context/1`, then scrub with `:before_send` if needed. If a future Elixir SDK release adds `send_default_pii`, recommend setting it when permitted. + ### Environment Variables | Variable | Maps to | Purpose | diff --git a/skills/sentry-flutter-sdk/SKILL.md b/skills/sentry-flutter-sdk/SKILL.md index a418733..bf54765 100644 --- a/skills/sentry-flutter-sdk/SKILL.md +++ b/skills/sentry-flutter-sdk/SKILL.md @@ -437,7 +437,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `environment` | `string` | — | e.g., `"production"`, `"staging"`. Env: `SENTRY_ENVIRONMENT` | | `release` | `string` | Auto on iOS/Android | `"packageName@version+build"`. Env: `SENTRY_RELEASE` | | `dist` | `string` | — | Distribution identifier; max 64 chars. Env: `SENTRY_DIST` | -| `sendDefaultPii` | `bool` | `false` | Include PII: IP address, user labels, widget text in replay | +| `sendDefaultPii` | `bool` | `false` | Recommended when privacy disclosures permit; includes IP address, user labels, and PII-gated widget text in replay | | `sampleRate` | `double` | `1.0` | Error event sampling (0.0–1.0) | | `maxBreadcrumbs` | `int` | `100` | Max breadcrumbs per event | | `attachStacktrace` | `bool` | `true` | Auto-attach stack traces to messages | diff --git a/skills/sentry-go-sdk/SKILL.md b/skills/sentry-go-sdk/SKILL.md index eb20f85..44a9dfe 100644 --- a/skills/sentry-go-sdk/SKILL.md +++ b/skills/sentry-go-sdk/SKILL.md @@ -239,7 +239,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `Dsn` | `string` | `""` | SDK disabled if empty; env: `SENTRY_DSN` | | `Environment` | `string` | `""` | e.g., `"production"`; env: `SENTRY_ENVIRONMENT` | | `Release` | `string` | `""` | e.g., `"my-app@1.0.0"`; env: `SENTRY_RELEASE` | -| `SendDefaultPII` | `bool` | `false` | Include IP, request headers | +| `SendDefaultPII` | `bool` | `false` | Recommended when privacy policy permits; includes IP and request headers | | `AttachStacktrace` | `bool` | `false` | Stack traces on `CaptureMessage` calls | | `SampleRate` | `float64` | `1.0` | Error event sample rate (0.0 treated as 1.0) | | `EnableTracing` | `bool` | `false` | Enable performance tracing | diff --git a/skills/sentry-nestjs-sdk/SKILL.md b/skills/sentry-nestjs-sdk/SKILL.md index 6615eea..defed25 100644 --- a/skills/sentry-nestjs-sdk/SKILL.md +++ b/skills/sentry-nestjs-sdk/SKILL.md @@ -491,7 +491,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `dsn` | `string` | — | SDK disabled if empty; env: `SENTRY_DSN` | | `environment` | `string` | `"production"` | e.g., `"staging"`; env: `SENTRY_ENVIRONMENT` | | `release` | `string` | — | e.g., `"myapp@1.0.0"`; env: `SENTRY_RELEASE` | -| `sendDefaultPii` | `boolean` | `false` | Include IP addresses and request headers | +| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; includes IP/request context and enables AI input/output capture defaults | | `tracesSampleRate` | `number` | — | Transaction sample rate; `undefined` disables tracing | | `tracesSampler` | `function` | — | Custom per-transaction sampling (overrides rate) | | `tracePropagationTargets` | `Array` | — | URLs to propagate `sentry-trace`/`baggage` headers to | diff --git a/skills/sentry-nestjs-sdk/references/ai-monitoring.md b/skills/sentry-nestjs-sdk/references/ai-monitoring.md index 11004b6..a780e33 100644 --- a/skills/sentry-nestjs-sdk/references/ai-monitoring.md +++ b/skills/sentry-nestjs-sdk/references/ai-monitoring.md @@ -39,7 +39,7 @@ All integrations listed below are **auto-enabled** when the corresponding AI lib ### Auto-Enabled Setup -OpenAI is auto-instrumented — no changes to `instrument.ts` needed. To customize: +OpenAI is auto-instrumented — no changes to `instrument.ts` needed. Set `sendDefaultPii: true` when prompt/output capture is approved: ```typescript // instrument.ts @@ -51,10 +51,7 @@ Sentry.init({ streamGenAiSpans: true, sendDefaultPii: true, // enables recordInputs/recordOutputs by default integrations: [ - Sentry.openAIIntegration({ - recordInputs: true, // capture prompts sent to OpenAI - recordOutputs: true, // capture generated text/completions - }), + Sentry.openAIIntegration(), ], }); ``` @@ -69,11 +66,9 @@ import * as Sentry from "@sentry/nestjs"; const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY }); -// Wrap once at module level — reuse this client everywhere -const client = Sentry.instrumentOpenAiClient(openai, { - recordInputs: true, - recordOutputs: true, -}); +// Wrap once at module level — reuse this client everywhere. +// Input/output recording follows sendDefaultPii unless explicitly overridden. +const client = Sentry.instrumentOpenAiClient(openai); ``` ### Streaming — Important @@ -122,11 +117,9 @@ Sentry.init({ dsn: process.env.SENTRY_DSN, tracesSampleRate: 1.0, streamGenAiSpans: true, + sendDefaultPii: true, // recommended when prompt/output capture is approved integrations: [ - Sentry.vercelAIIntegration({ - recordInputs: true, - recordOutputs: true, - }), + Sentry.vercelAIIntegration(), ], }); ``` @@ -149,8 +142,7 @@ export class AiService { experimental_telemetry: { isEnabled: true, functionId: "my-text-generation", - recordInputs: true, - recordOutputs: true, + // recordInputs/recordOutputs default to true when sendDefaultPii is true }, }); return result.text; @@ -193,11 +185,9 @@ Sentry.init({ dsn: process.env.SENTRY_DSN, tracesSampleRate: 1.0, streamGenAiSpans: true, + sendDefaultPii: true, // recommended when prompt/output capture is approved integrations: [ - Sentry.anthropicAIIntegration({ - recordInputs: true, - recordOutputs: true, - }), + Sentry.anthropicAIIntegration(), ], }); ``` @@ -210,10 +200,8 @@ import * as Sentry from "@sentry/nestjs"; const anthropic = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY }); -const client = Sentry.instrumentAnthropicAiClient(anthropic, { - recordInputs: true, - recordOutputs: true, -}); +// Input/output recording follows sendDefaultPii unless explicitly overridden. +const client = Sentry.instrumentAnthropicAiClient(anthropic); const response = await client.messages.create({ model: "claude-sonnet-4-20250514", @@ -256,7 +244,7 @@ Sentry automatically captures token usage following OpenTelemetry GenAI semantic `recordInputs` captures prompts sent to the AI API. `recordOutputs` captures the generated text/completions returned. -Both default to `true` only when `sendDefaultPii: true` is set: +Both default to `true` only when `sendDefaultPii: true` is set. Recommend this path when privacy policy and user consent allow prompt/output capture: ```typescript Sentry.init({ @@ -284,9 +272,9 @@ Sentry.init({ sendDefaultPii: true, enableLogs: true, integrations: [ - Sentry.openAIIntegration({ recordInputs: true, recordOutputs: true }), - Sentry.vercelAIIntegration({ recordInputs: true, recordOutputs: true }), - Sentry.anthropicAIIntegration({ recordInputs: true, recordOutputs: true }), + Sentry.openAIIntegration(), + Sentry.vercelAIIntegration(), + Sentry.anthropicAIIntegration(), ], }); ``` @@ -358,7 +346,7 @@ If your `tracesSampleRate` is below 1.0, you may be losing entire agent runs. Se |-------|----------| | No AI spans appearing | Verify `tracesSampleRate` > 0; AI monitoring requires tracing | | Token counts missing in streams | Add `stream_options: { include_usage: true }` to all OpenAI streaming calls | -| `recordInputs`/`recordOutputs` not capturing | Set `sendDefaultPii: true` or explicitly pass `recordInputs: true` to the integration | +| `recordInputs`/`recordOutputs` not capturing | Set `sendDefaultPii: true`; check no integration or callsite override sets recording to `false` | | Anthropic spans missing | Check SDK version; add `anthropicAIIntegration()` explicitly | | Cost estimates not showing | Model name must match models.dev/OpenRouter pricing data; custom models may show no estimate | | Vercel AI spans not tracked | Pass `experimental_telemetry: { isEnabled: true }` to every AI SDK call | diff --git a/skills/sentry-nextjs-sdk/SKILL.md b/skills/sentry-nextjs-sdk/SKILL.md index 1dbae7b..702987e 100644 --- a/skills/sentry-nextjs-sdk/SKILL.md +++ b/skills/sentry-nextjs-sdk/SKILL.md @@ -419,7 +419,7 @@ Then check your [Sentry Issues dashboard](https://sentry.io/issues/) — the err | `tracesSampleRate` | `number` | — | 0–1; 1.0 in dev, 0.1 in prod recommended | | `replaysSessionSampleRate` | `number` | `0.1` | Fraction of all sessions recorded | | `replaysOnErrorSampleRate` | `number` | `1.0` | Fraction of error sessions recorded | -| `sendDefaultPii` | `boolean` | `false` | Include IP, request headers in events | +| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; includes IP/request context and enables AI input/output capture defaults | | `includeLocalVariables` | `boolean` | `false` | Attach local variable values to stack frames (server only) | | `enableLogs` | `boolean` | `false` | Enable Sentry Logs product | | `environment` | `string` | auto | `"production"`, `"staging"`, etc. | diff --git a/skills/sentry-nextjs-sdk/references/ai-monitoring.md b/skills/sentry-nextjs-sdk/references/ai-monitoring.md index efe7cea..ca44776 100644 --- a/skills/sentry-nextjs-sdk/references/ai-monitoring.md +++ b/skills/sentry-nextjs-sdk/references/ai-monitoring.md @@ -53,18 +53,18 @@ Sentry.init({ // Tracing MUST be enabled for AI monitoring tracesSampleRate: 1.0, streamGenAiSpans: true, + sendDefaultPii: true, // recommended when prompt/output capture is approved integrations: [ - Sentry.openAIIntegration({ - recordInputs: true, // capture prompts sent to OpenAI - recordOutputs: true, // capture completions from OpenAI - }), + Sentry.openAIIntegration(), // recordInputs/recordOutputs default to true with sendDefaultPii ], }); ``` ### Client-Side / Manual Wrapping +Prompt/output capture assumes the matching client-side `Sentry.init()` also sets `sendDefaultPii: true` after approval. + ```typescript import OpenAI from "openai"; import * as Sentry from "@sentry/nextjs"; @@ -73,11 +73,9 @@ const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY, // ⚠️ Never expose this in the browser! }); -// Wrap once at module level — reuse this client everywhere -const client = Sentry.instrumentOpenAiClient(openai, { - recordInputs: true, - recordOutputs: true, -}); +// Wrap once at module level — reuse this client everywhere. +// Input/output recording follows sendDefaultPii unless explicitly overridden. +const client = Sentry.instrumentOpenAiClient(openai); const response = await client.chat.completions.create({ model: "gpt-4o", @@ -123,11 +121,10 @@ Sentry.init({ dsn: process.env.SENTRY_DSN, tracesSampleRate: 1.0, streamGenAiSpans: true, + sendDefaultPii: true, // recommended when prompt/output capture is approved integrations: [ Sentry.vercelAIIntegration({ force: true, // ← Required for Vercel production deployments (see note below) - recordInputs: true, - recordOutputs: true, }), ], }); @@ -141,6 +138,7 @@ Sentry.init({ dsn: process.env.SENTRY_DSN, tracesSampleRate: 1.0, streamGenAiSpans: true, + sendDefaultPii: true, // recommended when prompt/output capture is approved integrations: [ Sentry.vercelAIIntegration(), ], @@ -162,8 +160,7 @@ const result = await generateText({ experimental_telemetry: { isEnabled: true, functionId: "my-text-generation", // helps identify this function in traces - recordInputs: true, - recordOutputs: true, + // recordInputs/recordOutputs default to true when sendDefaultPii is true }, }); @@ -216,11 +213,9 @@ Sentry.init({ dsn: process.env.SENTRY_DSN, tracesSampleRate: 1.0, streamGenAiSpans: true, + sendDefaultPii: true, // recommended when prompt/output capture is approved integrations: [ - Sentry.anthropicAIIntegration({ - recordInputs: true, - recordOutputs: true, - }), + Sentry.anthropicAIIntegration(), ], }); ``` @@ -235,10 +230,8 @@ const anthropic = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY, // ⚠️ Never expose in the browser! }); -const client = Sentry.instrumentAnthropicAiClient(anthropic, { - recordInputs: true, - recordOutputs: true, -}); +// Input/output recording follows sendDefaultPii unless explicitly overridden. +const client = Sentry.instrumentAnthropicAiClient(anthropic); const response = await client.messages.create({ model: "claude-3-5-sonnet-20241022", @@ -294,13 +287,13 @@ Sentry.init({ }); ``` -Or enable explicitly without `sendDefaultPii`: +Use explicit integration options only when you need per-integration overrides instead of the recommended SDK-level default: ```typescript integrations: [ Sentry.openAIIntegration({ - recordInputs: true, // explicitly opt in - recordOutputs: true, + recordInputs: false, // opt out for this integration despite sendDefaultPii: true + recordOutputs: false, }), ], ``` @@ -319,10 +312,11 @@ Sentry.init({ dsn: process.env.SENTRY_DSN, tracesSampleRate: 1.0, streamGenAiSpans: true, + sendDefaultPii: true, integrations: [ - Sentry.openAIIntegration({ recordInputs: true, recordOutputs: true }), - Sentry.vercelAIIntegration({ force: true, recordInputs: true, recordOutputs: true }), - Sentry.anthropicAIIntegration({ recordInputs: true, recordOutputs: true }), + Sentry.openAIIntegration(), + Sentry.vercelAIIntegration({ force: true }), + Sentry.anthropicAIIntegration(), ], }); ``` @@ -363,8 +357,7 @@ export async function POST(req: Request) { experimental_telemetry: { isEnabled: true, // ← Required for Sentry to capture spans functionId: "chat-handler", - recordInputs: true, - recordOutputs: true, + // recordInputs/recordOutputs default to true when sendDefaultPii is true }, }); @@ -412,7 +405,7 @@ If your `tracesSampleRate` is below 1.0, you may be losing entire agent runs. Se | No AI spans appearing | Verify `tracesSampleRate` > 0; AI monitoring requires tracing | | Token counts missing in streams | Add `stream_options: { include_usage: true }` to all OpenAI streaming calls | | Vercel AI spans show raw names (`ai.toolCall`) | Add `vercelAIIntegration({ force: true })` in server config | -| `recordInputs`/`recordOutputs` not capturing | Set `sendDefaultPii: true` or explicitly pass `recordInputs: true` to the integration | +| `recordInputs`/`recordOutputs` not capturing | Set `sendDefaultPii: true`; check no integration or callsite override sets recording to `false` | | Anthropic spans missing | Check SDK version supports Anthropic integration; add `anthropicAIIntegration()` explicitly | | Cost estimates not showing | Model name must match models.dev/OpenRouter pricing data; custom/fine-tuned models may show no estimate | | Edge runtime AI spans missing | Add `vercelAIIntegration()` to `sentry.edge.config.ts` explicitly (not auto-enabled for Edge) | diff --git a/skills/sentry-node-sdk/SKILL.md b/skills/sentry-node-sdk/SKILL.md index 7aa69ce..0a4edda 100644 --- a/skills/sentry-node-sdk/SKILL.md +++ b/skills/sentry-node-sdk/SKILL.md @@ -736,7 +736,7 @@ Then check your [Sentry Issues dashboard](https://sentry.io/issues/) — the err |--------|------|---------|-------| | `dsn` | `string` | — | Required. Also from `SENTRY_DSN` env var | | `tracesSampleRate` | `number` | — | 0–1; required to enable tracing; **do not set when using OTLP path** | -| `sendDefaultPii` | `boolean` | `false` | Include IP, request headers, user info | +| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; includes IP/request/user context and enables AI input/output capture defaults | | `includeLocalVariables` | `boolean` | `false` | Add local variable values to stack frames (Node.js) | | `enableLogs` | `boolean` | `false` | Enable Sentry Logs product (v9.41.0+) | | `environment` | `string` | `"production"` | Also from `SENTRY_ENVIRONMENT` env var | diff --git a/skills/sentry-node-sdk/references/ai-monitoring.md b/skills/sentry-node-sdk/references/ai-monitoring.md index a55d6be..5d9a53f 100644 --- a/skills/sentry-node-sdk/references/ai-monitoring.md +++ b/skills/sentry-node-sdk/references/ai-monitoring.md @@ -7,7 +7,12 @@ Tracing must be enabled - AI spans require an active trace: ```typescript -Sentry.init({ dsn: "...", tracesSampleRate: 1.0, streamGenAiSpans: true }); +Sentry.init({ + dsn: "...", + tracesSampleRate: 1.0, + streamGenAiSpans: true, + // Add sendDefaultPii: true when prompt/output capture is approved. +}); ``` ## Integration Matrix @@ -31,6 +36,8 @@ Sentry.init({ dsn: "...", tracesSampleRate: 1.0, streamGenAiSpans: true }); | `true` | `true` (default) | Yes | | `true` | `false` | No | +Recommended path: when privacy policy and user consent allow capturing AI inputs/outputs, set `sendDefaultPii: true` in `Sentry.init()` and let supported integrations default `recordInputs`/`recordOutputs` to `true`. Use integration-level options to opt out or override specific integrations. + ## Configuration Examples ### Auto-enabled integrations @@ -47,16 +54,17 @@ Sentry.init({ // OpenAI, Anthropic, LangChain, LangGraph, Google GenAI activate automatically ``` -### Explicit configuration with recordInputs/recordOutputs override +### Explicit configuration with sendDefaultPii defaults ```typescript Sentry.init({ dsn: process.env.SENTRY_DSN, tracesSampleRate: 1.0, streamGenAiSpans: true, + sendDefaultPii: true, // recommended when prompt/output capture is approved integrations: [ - Sentry.openAIIntegration({ recordInputs: true, recordOutputs: true }), - Sentry.vercelAIIntegration({ recordInputs: true, recordOutputs: true }), + Sentry.openAIIntegration(), + Sentry.vercelAIIntegration(), ], }); ``` @@ -67,7 +75,8 @@ Sentry.init({ await generateText({ model: openai("gpt-4.1"), prompt: "Hello", - experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true }, + // recordInputs/recordOutputs default to true when sendDefaultPii is true in Sentry.init(). + experimental_telemetry: { isEnabled: true }, }); ``` @@ -144,7 +153,7 @@ await Sentry.startSpan({ | `gen_ai.operation.name` | string | No | Human-readable operation label | | `gen_ai.agent.name` | string | No | Agent name (for agent spans) | -### Content attributes (PII-gated - only when `sendDefaultPii: true` + `recordInputs/recordOutputs: true`) +### Content attributes (PII-gated — requires `sendDefaultPii: true` and no integration-level recording opt-out) | Attribute | Type | Description | |-----------|------|-------------| @@ -210,6 +219,6 @@ If `tracesSampleRate` < 1.0, see the [AI sampling guide](../../sentry-setup-ai-m | Token counts missing in streams | Add `stream_options: { include_usage: true }` (OpenAI) | | Vercel AI spans not tracked | Add `experimental_telemetry: { isEnabled: true }` per call | | Browser OpenAI not traced | Use `Sentry.instrumentOpenAiClient()` - auto-instrumentation is server-only | -| Prompts not captured | Set `sendDefaultPii: true` or explicit `recordInputs: true` | +| Prompts not captured | Set `sendDefaultPii: true`; check no integration or callsite override sets recording to `false` | | AI Agents Dashboard empty | Ensure traces are being sent; check DSN and `tracesSampleRate` | | Wrong cost calculations | Cached/reasoning tokens are subsets of totals, not additions | diff --git a/skills/sentry-php-sdk/SKILL.md b/skills/sentry-php-sdk/SKILL.md index 2248a38..e7107f1 100644 --- a/skills/sentry-php-sdk/SKILL.md +++ b/skills/sentry-php-sdk/SKILL.md @@ -242,7 +242,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `dsn` | `string\|bool\|null` | `$_SERVER['SENTRY_DSN']` | SDK disabled if empty or `false` | | `environment` | `string\|null` | `$_SERVER['SENTRY_ENVIRONMENT']` | e.g., `"staging"` | | `release` | `string\|null` | `$_SERVER['SENTRY_RELEASE']` | e.g., `"myapp@1.0.0"` | -| `send_default_pii` | `bool` | `false` | Include request headers, cookies, IP | +| `send_default_pii` | `bool` | `false` | Recommended when privacy policy permits; includes request headers, cookies, and IP | | `sample_rate` | `float` | `1.0` | Error event sample rate (0.0–1.0) | | `traces_sample_rate` | `float\|null` | `null` | Transaction sample rate; `null` disables tracing | | `traces_sampler` | `callable\|null` | `null` | Custom per-transaction sampling (overrides rate) | diff --git a/skills/sentry-python-sdk/SKILL.md b/skills/sentry-python-sdk/SKILL.md index 65d97f1..2f2e220 100644 --- a/skills/sentry-python-sdk/SKILL.md +++ b/skills/sentry-python-sdk/SKILL.md @@ -245,7 +245,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `dsn` | `str` | `None` | SDK disabled if empty; env: `SENTRY_DSN` | | `environment` | `str` | `"production"` | e.g., `"staging"`; env: `SENTRY_ENVIRONMENT` | | `release` | `str` | `None` | e.g., `"myapp@1.0.0"`; env: `SENTRY_RELEASE` | -| `send_default_pii` | `bool` | `False` | Include IP, headers, cookies, auth user | +| `send_default_pii` | `bool` | `False` | Recommended when privacy policy permits; includes IP/headers/cookies/auth user and enables AI prompt/output capture | | `traces_sample_rate` | `float` | `None` | Transaction sample rate; `None` disables tracing | | `traces_sampler` | `Callable` | `None` | Custom per-transaction sampling (overrides rate) | | `profile_session_sample_rate` | `float` | `None` | Continuous profiling session rate | diff --git a/skills/sentry-python-sdk/references/ai-monitoring.md b/skills/sentry-python-sdk/references/ai-monitoring.md index 483ef2e..dd6b3ab 100644 --- a/skills/sentry-python-sdk/references/ai-monitoring.md +++ b/skills/sentry-python-sdk/references/ai-monitoring.md @@ -7,7 +7,12 @@ Tracing must be enabled — AI spans require an active transaction: ```python -sentry_sdk.init(dsn="...", traces_sample_rate=1.0, stream_gen_ai_spans=True) +sentry_sdk.init( + dsn="...", + traces_sample_rate=1.0, + stream_gen_ai_spans=True, + # Add send_default_pii=True when prompt/output capture is approved. +) ``` ## Integration Matrix @@ -37,7 +42,7 @@ Every integration follows the same two-layer control: | `True` | `True` (default) | ✅ Yes | | `True` | `False` | ❌ No | -Set `send_default_pii=True` to capture prompts. Use `include_prompts=False` per-integration to override. +Recommended path: when privacy policy and user consent allow capturing AI inputs/outputs, set `send_default_pii=True` in `sentry_sdk.init()` and leave `include_prompts` at its default `True`. Use `include_prompts=False` per integration only to opt out. ## Configuration Examples diff --git a/skills/sentry-react-native-sdk/SKILL.md b/skills/sentry-react-native-sdk/SKILL.md index 9d2e537..cd87fe3 100644 --- a/skills/sentry-react-native-sdk/SKILL.md +++ b/skills/sentry-react-native-sdk/SKILL.md @@ -553,7 +553,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `environment` | `string` | — | e.g., `"production"`, `"staging"`. Env: `SENTRY_ENVIRONMENT` | | `release` | `string` | — | App version, e.g., `"my-app@1.0.0+42"`. Env: `SENTRY_RELEASE` | | `dist` | `string` | — | Build number / variant identifier (max 64 chars). Env: `SENTRY_DIST` | -| `sendDefaultPii` | `boolean` | `false` | Include PII: IP address, cookies, user data | +| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy disclosures permit; includes IP address, cookies, and user data | | `sampleRate` | `number` | `1.0` | Error event sampling (0.0–1.0) | | `maxBreadcrumbs` | `number` | `100` | Max breadcrumbs per event | | `attachStacktrace` | `boolean` | `true` | Auto-attach stack traces to messages | diff --git a/skills/sentry-react-router-framework-sdk/SKILL.md b/skills/sentry-react-router-framework-sdk/SKILL.md index 3eca213..5d7af2b 100644 --- a/skills/sentry-react-router-framework-sdk/SKILL.md +++ b/skills/sentry-react-router-framework-sdk/SKILL.md @@ -293,7 +293,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | Option | Type | Default | Notes | |--------|------|---------|-------| | `dsn` | `string` | — | Required; SDK disabled when empty | -| `sendDefaultPii` | `boolean` | `false` | Includes headers/IP-derived user context | +| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; includes headers/IP-derived user context and enables PII-gated AI input/output capture where supported | | `integrations` | `Integration[]` | SDK defaults | Add tracing/replay/feedback/profiling integrations | | `enableLogs` | `boolean` | `false` | Enables `Sentry.logger.*` ingestion | | `tracesSampleRate` | `number` | — | Usually `1.0` in testing, lower in production | diff --git a/skills/sentry-react-sdk/SKILL.md b/skills/sentry-react-sdk/SKILL.md index 1236dbf..5389060 100644 --- a/skills/sentry-react-sdk/SKILL.md +++ b/skills/sentry-react-sdk/SKILL.md @@ -356,7 +356,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `dsn` | `string` | — | **Required.** SDK disabled when empty | | `environment` | `string` | `"production"` | e.g., `"staging"`, `"development"` | | `release` | `string` | — | e.g., `"my-app@1.0.0"` or git SHA — links errors to releases | -| `sendDefaultPii` | `boolean` | `false` | Includes IP addresses and request headers | +| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; includes IP addresses/request headers and enables PII-gated AI input/output capture where supported | | `tracesSampleRate` | `number` | — | 0–1; `1.0` in dev, `0.1–0.2` in prod | | `tracesSampler` | `function` | — | Per-transaction sampling; overrides rate | | `tracePropagationTargets` | `(string\|RegExp)[]` | — | Outgoing URLs that receive distributed tracing headers | diff --git a/skills/sentry-ruby-sdk/SKILL.md b/skills/sentry-ruby-sdk/SKILL.md index c7a4d50..04d7bcd 100644 --- a/skills/sentry-ruby-sdk/SKILL.md +++ b/skills/sentry-ruby-sdk/SKILL.md @@ -212,7 +212,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `environment` | String | `nil` | e.g., `"production"`; env: `SENTRY_ENVIRONMENT` | | `release` | String | `nil` | e.g., `"myapp@1.0.0"`; env: `SENTRY_RELEASE` | | `spotlight` | Boolean | `false` | Send events to Spotlight sidecar (local dev, no DSN needed) | -| `send_default_pii` | Boolean | `false` | Include IP addresses and request headers | +| `send_default_pii` | Boolean | `false` | Recommended when privacy policy permits; includes IP addresses and request headers | | `sample_rate` | Float | `1.0` | Error event sample rate (0.0–1.0) | | `traces_sample_rate` | Float | `nil` | Transaction sample rate; `nil` disables tracing | | `profiles_sample_rate` | Float | `nil` | Profiling rate relative to `traces_sample_rate`; requires `stackprof` or `vernier` | diff --git a/skills/sentry-setup-ai-monitoring/SKILL.md b/skills/sentry-setup-ai-monitoring/SKILL.md index b864557..80fce30 100644 --- a/skills/sentry-setup-ai-monitoring/SKILL.md +++ b/skills/sentry-setup-ai-monitoring/SKILL.md @@ -27,13 +27,13 @@ AI monitoring requires **tracing enabled** (`tracesSampleRate > 0`). ## Data Capture Warning -**Prompt and output recording captures user content that is likely PII.** Before enabling `recordInputs`/`recordOutputs` (JS) or `include_prompts`/`send_default_pii` (Python), confirm: +**Prompt and output recording captures user content that is likely PII.** Before enabling send-default-PII (`sendDefaultPii: true` in JavaScript or `send_default_pii=True` in Python) or per-integration prompt/output capture (`recordInputs`/`recordOutputs` in JS, `include_prompts` in Python), confirm: - The application's privacy policy permits capturing user prompts and model responses - Captured data complies with applicable regulations (GDPR, CCPA, etc.) - Sentry data retention settings are appropriate for the sensitivity of the data -**Ask the user** whether they want prompt/output capture enabled. Do not enable it by default — configure it only when explicitly requested or confirmed. Use `tracesSampleRate: 1.0` only in development; in production, use a lower value or a `tracesSampler` function. +**Ask the user** whether they want prompt/output capture enabled. When they confirm, recommend enabling the SDK's send-default-PII option first, then use integration-level options only to override defaults. Do not enable prompt/output capture without explicit confirmation. Use `tracesSampleRate: 1.0` only in development; in production, use a lower value or a `tracesSampler` function. ## Detection First @@ -112,15 +112,20 @@ Sentry.init({ }); ``` -To customize (e.g., enable prompt capture — see Data Capture Warning): +To customize (e.g., enable prompt capture after user confirmation — see Data Capture Warning): ```javascript -integrations: [ - Sentry.openAIIntegration({ - // recordInputs: true, // Opt-in: captures prompt content (PII) - // recordOutputs: true, // Opt-in: captures response content (PII) - }), -], +Sentry.init({ + dsn: "YOUR_DSN", + tracesSampleRate: 1.0, + streamGenAiSpans: true, + sendDefaultPii: true, // Recommended when prompt/output capture is approved + integrations: [ + Sentry.openAIIntegration({ + // recordInputs/recordOutputs default to true when sendDefaultPii is true + }), + ], +}); ``` ### Browser / Next.js OpenAI (manual wrapping required) @@ -138,23 +143,29 @@ const openai = Sentry.instrumentOpenAiClient(new OpenAI()); ### LangChain / LangGraph (auto-enabled) ```javascript -integrations: [ - Sentry.langChainIntegration({ - // recordInputs: true, // Opt-in: captures prompt content (PII) - // recordOutputs: true, // Opt-in: captures response content (PII) - }), - Sentry.langGraphIntegration({ - // recordInputs: true, - // recordOutputs: true, - }), -], +Sentry.init({ + dsn: "YOUR_DSN", + tracesSampleRate: 1.0, + streamGenAiSpans: true, + sendDefaultPii: true, // Recommended when prompt/output capture is approved + integrations: [ + Sentry.langChainIntegration(), + Sentry.langGraphIntegration(), + ], +}); ``` ### Vercel AI SDK -Add to `sentry.edge.config.ts` for Edge runtime: +Add to `sentry.edge.config.ts` for Edge runtime. Include `sendDefaultPii: true` once prompt/output capture is approved: ```javascript -integrations: [Sentry.vercelAIIntegration()], +Sentry.init({ + dsn: "YOUR_DSN", + tracesSampleRate: 1.0, + streamGenAiSpans: true, + sendDefaultPii: true, + integrations: [Sentry.vercelAIIntegration()], +}); ``` Enable telemetry per-call: @@ -164,8 +175,7 @@ await generateText({ prompt: "Hello", experimental_telemetry: { isEnabled: true, - // recordInputs: true, // Opt-in: captures prompt content (PII) - // recordOutputs: true, // Opt-in: captures response content (PII) + // recordInputs/recordOutputs default to true when sendDefaultPii is true }, }); ``` @@ -181,7 +191,8 @@ sentry_sdk.init( dsn="YOUR_DSN", traces_sample_rate=1.0, # Lower in production (e.g., 0.1) stream_gen_ai_spans=True, # SDK ≥2.60.0 - # send_default_pii=True, # Opt-in: required for prompt capture (sends user PII) + # Recommended once prompt/output capture is approved: + # send_default_pii=True, # required for prompt/output capture (sends user PII) # Integrations auto-enable when the AI package is installed. # Only specify explicitly to customize (e.g., include_prompts): # integrations=[OpenAIIntegration(include_prompts=True)], @@ -299,5 +310,5 @@ After configuring, make an LLM call and check the Sentry Traces dashboard. AI sp | AI spans not appearing | Verify `tracesSampleRate > 0`, check SDK version | | Token counts missing | Some providers don't return tokens for streaming | | Negative or wrong costs in dashboard | Cached/reasoning tokens are subsets of totals — see Token Usage and Cost Calculation | -| Prompts not captured | Enable `recordInputs`/`include_prompts` | +| Prompts not captured | Set `sendDefaultPii: true` (JS) or `send_default_pii=True` (Python); use `recordInputs`/`include_prompts` only for explicit overrides | | Vercel AI not working | Add `experimental_telemetry` to each call | diff --git a/skills/sentry-svelte-sdk/SKILL.md b/skills/sentry-svelte-sdk/SKILL.md index 16c50eb..69ea750 100644 --- a/skills/sentry-svelte-sdk/SKILL.md +++ b/skills/sentry-svelte-sdk/SKILL.md @@ -343,7 +343,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `dsn` | `string` | — | **Required.** Use env var; SDK is disabled when empty | | `environment` | `string` | `"production"` | e.g., `"staging"`, `"development"` | | `release` | `string` | — | e.g., `"my-app@1.2.3"` or git SHA | -| `sendDefaultPii` | `boolean` | `false` | Includes IP addresses and request headers | +| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; includes IP addresses/request headers and enables PII-gated AI input/output capture where supported | | `tracesSampleRate` | `number` | — | 0–1; use `1.0` in dev, `0.1–0.2` in prod | | `tracesSampler` | `function` | — | Per-transaction sampling; overrides `tracesSampleRate` | | `tracePropagationTargets` | `(string\|RegExp)[]` | — | URLs that receive distributed tracing headers | diff --git a/skills/sentry-tanstack-start-sdk/SKILL.md b/skills/sentry-tanstack-start-sdk/SKILL.md index ae2c5be..5fb8292 100644 --- a/skills/sentry-tanstack-start-sdk/SKILL.md +++ b/skills/sentry-tanstack-start-sdk/SKILL.md @@ -266,7 +266,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | Option | Type | Default | Notes | |--------|------|---------|-------| | `dsn` | `string` | — | Required; SDK is disabled when empty | -| `sendDefaultPii` | `boolean` | `false` | Sends request headers and IP-derived user context | +| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; sends request headers/IP-derived user context and enables PII-gated AI input/output capture where supported | | `integrations` | `Integration[]` | SDK defaults | Include TanStack Router tracing, replay, feedback as needed | | `enableLogs` | `boolean` | `false` | Enables `Sentry.logger.*` APIs | | `tracesSampleRate` | `number` | — | `1.0` in development, lower in production | From 991d134a97fb07b3eb6e55877f6aca100401e183 Mon Sep 17 00:00:00 2001 From: Ogi <86684834+obostjancic@users.noreply.github.com> Date: Mon, 18 May 2026 12:28:15 +0200 Subject: [PATCH 2/4] revert sendDefaultPii option table wording changes Keep original factual descriptions for sendDefaultPii/send_default_pii in SDK option tables instead of recommendation-style wording. Co-Authored-By: Claude (claude-sonnet-4-20250514) --- skills/sentry-android-sdk/SKILL.md | 2 +- skills/sentry-browser-sdk/SKILL.md | 2 +- skills/sentry-cloudflare-sdk/SKILL.md | 2 +- skills/sentry-cocoa-sdk/SKILL.md | 2 +- skills/sentry-dotnet-sdk/SKILL.md | 2 +- skills/sentry-flutter-sdk/SKILL.md | 2 +- skills/sentry-go-sdk/SKILL.md | 2 +- skills/sentry-nestjs-sdk/SKILL.md | 2 +- skills/sentry-nextjs-sdk/SKILL.md | 2 +- skills/sentry-node-sdk/SKILL.md | 2 +- skills/sentry-php-sdk/SKILL.md | 2 +- skills/sentry-python-sdk/SKILL.md | 2 +- skills/sentry-react-native-sdk/SKILL.md | 2 +- skills/sentry-react-router-framework-sdk/SKILL.md | 2 +- skills/sentry-react-sdk/SKILL.md | 2 +- skills/sentry-ruby-sdk/SKILL.md | 2 +- skills/sentry-svelte-sdk/SKILL.md | 2 +- skills/sentry-tanstack-start-sdk/SKILL.md | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/skills/sentry-android-sdk/SKILL.md b/skills/sentry-android-sdk/SKILL.md index 8f6e91f..64eeb53 100644 --- a/skills/sentry-android-sdk/SKILL.md +++ b/skills/sentry-android-sdk/SKILL.md @@ -570,7 +570,7 @@ The plugin can inject instrumentation automatically (no source changes): | `environment` | `String` | — | e.g., `"production"`, `"staging"`. Env: `SENTRY_ENVIRONMENT` | | `release` | `String` | — | App version, e.g., `"my-app@1.0.0+42"`. Env: `SENTRY_RELEASE` | | `dist` | `String` | — | Build variant / distribution identifier | -| `sendDefaultPii` | `Boolean` | `false` | Recommended when privacy disclosures permit; includes IP address and user data | +| `sendDefaultPii` | `Boolean` | `false` | Include PII: IP address, user data | | `sampleRate` | `Double` | `1.0` | Error event sampling (0.0–1.0) | | `maxBreadcrumbs` | `Int` | `100` | Max breadcrumbs per event | | `isAttachStacktrace` | `Boolean` | `true` | Auto-attach stack traces to message events | diff --git a/skills/sentry-browser-sdk/SKILL.md b/skills/sentry-browser-sdk/SKILL.md index 0a503fb..4420649 100644 --- a/skills/sentry-browser-sdk/SKILL.md +++ b/skills/sentry-browser-sdk/SKILL.md @@ -531,7 +531,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `dsn` | `string` | — | **Required.** SDK disabled when empty | | `environment` | `string` | `"production"` | e.g., `"staging"`, `"development"` | | `release` | `string` | — | e.g., `"my-app@1.0.0"` or git SHA — links errors to releases | -| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; includes IP addresses/request headers and enables PII-gated AI input/output capture where supported | +| `sendDefaultPii` | `boolean` | `false` | Includes IP addresses and request headers | | `tracesSampleRate` | `number` | — | 0–1; `1.0` in dev, `0.1–0.2` in prod | | `tracesSampler` | `function` | — | Per-transaction sampling; overrides rate | | `tracePropagationTargets` | `(string\|RegExp)[]` | same-origin | Outgoing URLs that receive distributed tracing headers | diff --git a/skills/sentry-cloudflare-sdk/SKILL.md b/skills/sentry-cloudflare-sdk/SKILL.md index 8a4bec5..9d5fbf4 100644 --- a/skills/sentry-cloudflare-sdk/SKILL.md +++ b/skills/sentry-cloudflare-sdk/SKILL.md @@ -427,7 +427,7 @@ Deploy and trigger the route, then check your [Sentry Issues dashboard](https:// | `dsn` | `string` | — | Required. Read from `env.SENTRY_DSN` automatically if not set | | `tracesSampleRate` | `number` | — | 0–1; 1.0 in dev, lower in prod recommended | | `tracesSampler` | `function` | — | Dynamic sampling function; mutually exclusive with `tracesSampleRate` | -| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; includes request headers/cookies and enables PII-gated AI input/output capture where supported | +| `sendDefaultPii` | `boolean` | `false` | Include request headers and cookies in events | | `enableLogs` | `boolean` | `false` | Enable Sentry Logs product | | `environment` | `string` | auto | Read from `env.SENTRY_ENVIRONMENT` if not set | | `release` | `string` | auto | Detected from `CF_VERSION_METADATA.id` or `SENTRY_RELEASE` | diff --git a/skills/sentry-cocoa-sdk/SKILL.md b/skills/sentry-cocoa-sdk/SKILL.md index f01853c..60628cf 100644 --- a/skills/sentry-cocoa-sdk/SKILL.md +++ b/skills/sentry-cocoa-sdk/SKILL.md @@ -283,7 +283,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `environment` | `String` | `""` | e.g., `"production"`; reads `SENTRY_ENVIRONMENT` | | `releaseName` | `String` | `""` | e.g., `"my-app@1.0.0"`; reads `SENTRY_RELEASE` | | `debug` | `Bool` | `false` | Verbose SDK output — **disable in production** | -| `sendDefaultPii` | `Bool` | `false` | Recommended when privacy disclosures permit; includes IP and user info from active integrations | +| `sendDefaultPii` | `Bool` | `false` | Include IP, user info from active integrations | | `enableCrashHandler` | `Bool` | `true` | Master switch for crash reporting | | `enableAppHangTrackingV2` | `Bool` | `true` (9.0+) | Differentiates fully/non-fully blocked hangs | | `appHangTimeoutInterval` | `Double` | `2.0` | Seconds before classifying as hang | diff --git a/skills/sentry-dotnet-sdk/SKILL.md b/skills/sentry-dotnet-sdk/SKILL.md index fb5fe70..7b4b4fb 100644 --- a/skills/sentry-dotnet-sdk/SKILL.md +++ b/skills/sentry-dotnet-sdk/SKILL.md @@ -514,7 +514,7 @@ Then check your [Sentry Issues dashboard](https://sentry.io/issues/) — the err | `TracesSampleRate` | `double` | `0.0` | — | Transaction sampling. Must be `> 0` to enable. | | `TracesSampler` | `Func` | — | — | Per-transaction dynamic sampler; overrides `TracesSampleRate` | | `ProfilesSampleRate` | `double` | `0.0` | — | Fraction of traced transactions to profile. Requires `Sentry.Profiling`. | -| `SendDefaultPii` | `bool` | `false` | — | Recommended when privacy disclosures permit; includes user IP, name, and email | +| `SendDefaultPii` | `bool` | `false` | — | Include user IP, name, email | | `AttachStacktrace` | `bool` | `true` | — | Attach stack trace to all messages | | `MaxBreadcrumbs` | `int` | `100` | — | Max breadcrumbs stored per event | | `IsGlobalModeEnabled` | `bool` | `false`* | — | *Auto-`true` for MAUI, Blazor WASM. **Must** be `true` for WPF, WinForms, Console. | diff --git a/skills/sentry-flutter-sdk/SKILL.md b/skills/sentry-flutter-sdk/SKILL.md index bf54765..a418733 100644 --- a/skills/sentry-flutter-sdk/SKILL.md +++ b/skills/sentry-flutter-sdk/SKILL.md @@ -437,7 +437,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `environment` | `string` | — | e.g., `"production"`, `"staging"`. Env: `SENTRY_ENVIRONMENT` | | `release` | `string` | Auto on iOS/Android | `"packageName@version+build"`. Env: `SENTRY_RELEASE` | | `dist` | `string` | — | Distribution identifier; max 64 chars. Env: `SENTRY_DIST` | -| `sendDefaultPii` | `bool` | `false` | Recommended when privacy disclosures permit; includes IP address, user labels, and PII-gated widget text in replay | +| `sendDefaultPii` | `bool` | `false` | Include PII: IP address, user labels, widget text in replay | | `sampleRate` | `double` | `1.0` | Error event sampling (0.0–1.0) | | `maxBreadcrumbs` | `int` | `100` | Max breadcrumbs per event | | `attachStacktrace` | `bool` | `true` | Auto-attach stack traces to messages | diff --git a/skills/sentry-go-sdk/SKILL.md b/skills/sentry-go-sdk/SKILL.md index 44a9dfe..eb20f85 100644 --- a/skills/sentry-go-sdk/SKILL.md +++ b/skills/sentry-go-sdk/SKILL.md @@ -239,7 +239,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `Dsn` | `string` | `""` | SDK disabled if empty; env: `SENTRY_DSN` | | `Environment` | `string` | `""` | e.g., `"production"`; env: `SENTRY_ENVIRONMENT` | | `Release` | `string` | `""` | e.g., `"my-app@1.0.0"`; env: `SENTRY_RELEASE` | -| `SendDefaultPII` | `bool` | `false` | Recommended when privacy policy permits; includes IP and request headers | +| `SendDefaultPII` | `bool` | `false` | Include IP, request headers | | `AttachStacktrace` | `bool` | `false` | Stack traces on `CaptureMessage` calls | | `SampleRate` | `float64` | `1.0` | Error event sample rate (0.0 treated as 1.0) | | `EnableTracing` | `bool` | `false` | Enable performance tracing | diff --git a/skills/sentry-nestjs-sdk/SKILL.md b/skills/sentry-nestjs-sdk/SKILL.md index defed25..6615eea 100644 --- a/skills/sentry-nestjs-sdk/SKILL.md +++ b/skills/sentry-nestjs-sdk/SKILL.md @@ -491,7 +491,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `dsn` | `string` | — | SDK disabled if empty; env: `SENTRY_DSN` | | `environment` | `string` | `"production"` | e.g., `"staging"`; env: `SENTRY_ENVIRONMENT` | | `release` | `string` | — | e.g., `"myapp@1.0.0"`; env: `SENTRY_RELEASE` | -| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; includes IP/request context and enables AI input/output capture defaults | +| `sendDefaultPii` | `boolean` | `false` | Include IP addresses and request headers | | `tracesSampleRate` | `number` | — | Transaction sample rate; `undefined` disables tracing | | `tracesSampler` | `function` | — | Custom per-transaction sampling (overrides rate) | | `tracePropagationTargets` | `Array` | — | URLs to propagate `sentry-trace`/`baggage` headers to | diff --git a/skills/sentry-nextjs-sdk/SKILL.md b/skills/sentry-nextjs-sdk/SKILL.md index 702987e..1dbae7b 100644 --- a/skills/sentry-nextjs-sdk/SKILL.md +++ b/skills/sentry-nextjs-sdk/SKILL.md @@ -419,7 +419,7 @@ Then check your [Sentry Issues dashboard](https://sentry.io/issues/) — the err | `tracesSampleRate` | `number` | — | 0–1; 1.0 in dev, 0.1 in prod recommended | | `replaysSessionSampleRate` | `number` | `0.1` | Fraction of all sessions recorded | | `replaysOnErrorSampleRate` | `number` | `1.0` | Fraction of error sessions recorded | -| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; includes IP/request context and enables AI input/output capture defaults | +| `sendDefaultPii` | `boolean` | `false` | Include IP, request headers in events | | `includeLocalVariables` | `boolean` | `false` | Attach local variable values to stack frames (server only) | | `enableLogs` | `boolean` | `false` | Enable Sentry Logs product | | `environment` | `string` | auto | `"production"`, `"staging"`, etc. | diff --git a/skills/sentry-node-sdk/SKILL.md b/skills/sentry-node-sdk/SKILL.md index 0a4edda..7aa69ce 100644 --- a/skills/sentry-node-sdk/SKILL.md +++ b/skills/sentry-node-sdk/SKILL.md @@ -736,7 +736,7 @@ Then check your [Sentry Issues dashboard](https://sentry.io/issues/) — the err |--------|------|---------|-------| | `dsn` | `string` | — | Required. Also from `SENTRY_DSN` env var | | `tracesSampleRate` | `number` | — | 0–1; required to enable tracing; **do not set when using OTLP path** | -| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; includes IP/request/user context and enables AI input/output capture defaults | +| `sendDefaultPii` | `boolean` | `false` | Include IP, request headers, user info | | `includeLocalVariables` | `boolean` | `false` | Add local variable values to stack frames (Node.js) | | `enableLogs` | `boolean` | `false` | Enable Sentry Logs product (v9.41.0+) | | `environment` | `string` | `"production"` | Also from `SENTRY_ENVIRONMENT` env var | diff --git a/skills/sentry-php-sdk/SKILL.md b/skills/sentry-php-sdk/SKILL.md index e7107f1..2248a38 100644 --- a/skills/sentry-php-sdk/SKILL.md +++ b/skills/sentry-php-sdk/SKILL.md @@ -242,7 +242,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `dsn` | `string\|bool\|null` | `$_SERVER['SENTRY_DSN']` | SDK disabled if empty or `false` | | `environment` | `string\|null` | `$_SERVER['SENTRY_ENVIRONMENT']` | e.g., `"staging"` | | `release` | `string\|null` | `$_SERVER['SENTRY_RELEASE']` | e.g., `"myapp@1.0.0"` | -| `send_default_pii` | `bool` | `false` | Recommended when privacy policy permits; includes request headers, cookies, and IP | +| `send_default_pii` | `bool` | `false` | Include request headers, cookies, IP | | `sample_rate` | `float` | `1.0` | Error event sample rate (0.0–1.0) | | `traces_sample_rate` | `float\|null` | `null` | Transaction sample rate; `null` disables tracing | | `traces_sampler` | `callable\|null` | `null` | Custom per-transaction sampling (overrides rate) | diff --git a/skills/sentry-python-sdk/SKILL.md b/skills/sentry-python-sdk/SKILL.md index 2f2e220..65d97f1 100644 --- a/skills/sentry-python-sdk/SKILL.md +++ b/skills/sentry-python-sdk/SKILL.md @@ -245,7 +245,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `dsn` | `str` | `None` | SDK disabled if empty; env: `SENTRY_DSN` | | `environment` | `str` | `"production"` | e.g., `"staging"`; env: `SENTRY_ENVIRONMENT` | | `release` | `str` | `None` | e.g., `"myapp@1.0.0"`; env: `SENTRY_RELEASE` | -| `send_default_pii` | `bool` | `False` | Recommended when privacy policy permits; includes IP/headers/cookies/auth user and enables AI prompt/output capture | +| `send_default_pii` | `bool` | `False` | Include IP, headers, cookies, auth user | | `traces_sample_rate` | `float` | `None` | Transaction sample rate; `None` disables tracing | | `traces_sampler` | `Callable` | `None` | Custom per-transaction sampling (overrides rate) | | `profile_session_sample_rate` | `float` | `None` | Continuous profiling session rate | diff --git a/skills/sentry-react-native-sdk/SKILL.md b/skills/sentry-react-native-sdk/SKILL.md index cd87fe3..9d2e537 100644 --- a/skills/sentry-react-native-sdk/SKILL.md +++ b/skills/sentry-react-native-sdk/SKILL.md @@ -553,7 +553,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `environment` | `string` | — | e.g., `"production"`, `"staging"`. Env: `SENTRY_ENVIRONMENT` | | `release` | `string` | — | App version, e.g., `"my-app@1.0.0+42"`. Env: `SENTRY_RELEASE` | | `dist` | `string` | — | Build number / variant identifier (max 64 chars). Env: `SENTRY_DIST` | -| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy disclosures permit; includes IP address, cookies, and user data | +| `sendDefaultPii` | `boolean` | `false` | Include PII: IP address, cookies, user data | | `sampleRate` | `number` | `1.0` | Error event sampling (0.0–1.0) | | `maxBreadcrumbs` | `number` | `100` | Max breadcrumbs per event | | `attachStacktrace` | `boolean` | `true` | Auto-attach stack traces to messages | diff --git a/skills/sentry-react-router-framework-sdk/SKILL.md b/skills/sentry-react-router-framework-sdk/SKILL.md index 5d7af2b..3eca213 100644 --- a/skills/sentry-react-router-framework-sdk/SKILL.md +++ b/skills/sentry-react-router-framework-sdk/SKILL.md @@ -293,7 +293,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | Option | Type | Default | Notes | |--------|------|---------|-------| | `dsn` | `string` | — | Required; SDK disabled when empty | -| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; includes headers/IP-derived user context and enables PII-gated AI input/output capture where supported | +| `sendDefaultPii` | `boolean` | `false` | Includes headers/IP-derived user context | | `integrations` | `Integration[]` | SDK defaults | Add tracing/replay/feedback/profiling integrations | | `enableLogs` | `boolean` | `false` | Enables `Sentry.logger.*` ingestion | | `tracesSampleRate` | `number` | — | Usually `1.0` in testing, lower in production | diff --git a/skills/sentry-react-sdk/SKILL.md b/skills/sentry-react-sdk/SKILL.md index 5389060..1236dbf 100644 --- a/skills/sentry-react-sdk/SKILL.md +++ b/skills/sentry-react-sdk/SKILL.md @@ -356,7 +356,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `dsn` | `string` | — | **Required.** SDK disabled when empty | | `environment` | `string` | `"production"` | e.g., `"staging"`, `"development"` | | `release` | `string` | — | e.g., `"my-app@1.0.0"` or git SHA — links errors to releases | -| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; includes IP addresses/request headers and enables PII-gated AI input/output capture where supported | +| `sendDefaultPii` | `boolean` | `false` | Includes IP addresses and request headers | | `tracesSampleRate` | `number` | — | 0–1; `1.0` in dev, `0.1–0.2` in prod | | `tracesSampler` | `function` | — | Per-transaction sampling; overrides rate | | `tracePropagationTargets` | `(string\|RegExp)[]` | — | Outgoing URLs that receive distributed tracing headers | diff --git a/skills/sentry-ruby-sdk/SKILL.md b/skills/sentry-ruby-sdk/SKILL.md index 04d7bcd..c7a4d50 100644 --- a/skills/sentry-ruby-sdk/SKILL.md +++ b/skills/sentry-ruby-sdk/SKILL.md @@ -212,7 +212,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `environment` | String | `nil` | e.g., `"production"`; env: `SENTRY_ENVIRONMENT` | | `release` | String | `nil` | e.g., `"myapp@1.0.0"`; env: `SENTRY_RELEASE` | | `spotlight` | Boolean | `false` | Send events to Spotlight sidecar (local dev, no DSN needed) | -| `send_default_pii` | Boolean | `false` | Recommended when privacy policy permits; includes IP addresses and request headers | +| `send_default_pii` | Boolean | `false` | Include IP addresses and request headers | | `sample_rate` | Float | `1.0` | Error event sample rate (0.0–1.0) | | `traces_sample_rate` | Float | `nil` | Transaction sample rate; `nil` disables tracing | | `profiles_sample_rate` | Float | `nil` | Profiling rate relative to `traces_sample_rate`; requires `stackprof` or `vernier` | diff --git a/skills/sentry-svelte-sdk/SKILL.md b/skills/sentry-svelte-sdk/SKILL.md index 69ea750..16c50eb 100644 --- a/skills/sentry-svelte-sdk/SKILL.md +++ b/skills/sentry-svelte-sdk/SKILL.md @@ -343,7 +343,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | `dsn` | `string` | — | **Required.** Use env var; SDK is disabled when empty | | `environment` | `string` | `"production"` | e.g., `"staging"`, `"development"` | | `release` | `string` | — | e.g., `"my-app@1.2.3"` or git SHA | -| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; includes IP addresses/request headers and enables PII-gated AI input/output capture where supported | +| `sendDefaultPii` | `boolean` | `false` | Includes IP addresses and request headers | | `tracesSampleRate` | `number` | — | 0–1; use `1.0` in dev, `0.1–0.2` in prod | | `tracesSampler` | `function` | — | Per-transaction sampling; overrides `tracesSampleRate` | | `tracePropagationTargets` | `(string\|RegExp)[]` | — | URLs that receive distributed tracing headers | diff --git a/skills/sentry-tanstack-start-sdk/SKILL.md b/skills/sentry-tanstack-start-sdk/SKILL.md index 5fb8292..ae2c5be 100644 --- a/skills/sentry-tanstack-start-sdk/SKILL.md +++ b/skills/sentry-tanstack-start-sdk/SKILL.md @@ -266,7 +266,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa | Option | Type | Default | Notes | |--------|------|---------|-------| | `dsn` | `string` | — | Required; SDK is disabled when empty | -| `sendDefaultPii` | `boolean` | `false` | Recommended when privacy policy permits; sends request headers/IP-derived user context and enables PII-gated AI input/output capture where supported | +| `sendDefaultPii` | `boolean` | `false` | Sends request headers and IP-derived user context | | `integrations` | `Integration[]` | SDK defaults | Include TanStack Router tracing, replay, feedback as needed | | `enableLogs` | `boolean` | `false` | Enables `Sentry.logger.*` APIs | | `tracesSampleRate` | `number` | — | `1.0` in development, lower in production | From e081c9faf2482dd7503838d2a865eff17994c5fd Mon Sep 17 00:00:00 2001 From: Ogi <86684834+obostjancic@users.noreply.github.com> Date: Mon, 18 May 2026 12:56:15 +0200 Subject: [PATCH 3/4] restore explicit recordInputs/recordOutputs in experimental_telemetry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vercel AI SDK's experimental_telemetry requires explicit recordInputs/recordOutputs — they don't inherit from sendDefaultPii. Co-Authored-By: Claude (claude-sonnet-4-20250514) --- skills/sentry-nestjs-sdk/references/ai-monitoring.md | 3 ++- skills/sentry-nextjs-sdk/references/ai-monitoring.md | 6 ++++-- skills/sentry-node-sdk/references/ai-monitoring.md | 3 +-- skills/sentry-setup-ai-monitoring/SKILL.md | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/skills/sentry-nestjs-sdk/references/ai-monitoring.md b/skills/sentry-nestjs-sdk/references/ai-monitoring.md index a780e33..d4d3fce 100644 --- a/skills/sentry-nestjs-sdk/references/ai-monitoring.md +++ b/skills/sentry-nestjs-sdk/references/ai-monitoring.md @@ -142,7 +142,8 @@ export class AiService { experimental_telemetry: { isEnabled: true, functionId: "my-text-generation", - // recordInputs/recordOutputs default to true when sendDefaultPii is true + recordInputs: true, + recordOutputs: true, }, }); return result.text; diff --git a/skills/sentry-nextjs-sdk/references/ai-monitoring.md b/skills/sentry-nextjs-sdk/references/ai-monitoring.md index ca44776..69f88f5 100644 --- a/skills/sentry-nextjs-sdk/references/ai-monitoring.md +++ b/skills/sentry-nextjs-sdk/references/ai-monitoring.md @@ -160,7 +160,8 @@ const result = await generateText({ experimental_telemetry: { isEnabled: true, functionId: "my-text-generation", // helps identify this function in traces - // recordInputs/recordOutputs default to true when sendDefaultPii is true + recordInputs: true, + recordOutputs: true, }, }); @@ -357,7 +358,8 @@ export async function POST(req: Request) { experimental_telemetry: { isEnabled: true, // ← Required for Sentry to capture spans functionId: "chat-handler", - // recordInputs/recordOutputs default to true when sendDefaultPii is true + recordInputs: true, + recordOutputs: true, }, }); diff --git a/skills/sentry-node-sdk/references/ai-monitoring.md b/skills/sentry-node-sdk/references/ai-monitoring.md index 5d9a53f..84b6cc9 100644 --- a/skills/sentry-node-sdk/references/ai-monitoring.md +++ b/skills/sentry-node-sdk/references/ai-monitoring.md @@ -75,8 +75,7 @@ Sentry.init({ await generateText({ model: openai("gpt-4.1"), prompt: "Hello", - // recordInputs/recordOutputs default to true when sendDefaultPii is true in Sentry.init(). - experimental_telemetry: { isEnabled: true }, + experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true }, }); ``` diff --git a/skills/sentry-setup-ai-monitoring/SKILL.md b/skills/sentry-setup-ai-monitoring/SKILL.md index 80fce30..c21c498 100644 --- a/skills/sentry-setup-ai-monitoring/SKILL.md +++ b/skills/sentry-setup-ai-monitoring/SKILL.md @@ -175,7 +175,8 @@ await generateText({ prompt: "Hello", experimental_telemetry: { isEnabled: true, - // recordInputs/recordOutputs default to true when sendDefaultPii is true + recordInputs: true, + recordOutputs: true, }, }); ``` From 07912f8387c89c19d983096f7ffbeb279a2f48cb Mon Sep 17 00:00:00 2001 From: Ogi <86684834+obostjancic@users.noreply.github.com> Date: Mon, 18 May 2026 13:11:38 +0200 Subject: [PATCH 4/4] always include sendDefaultPii, remove conditional wording - Remove 'recommended when prompt/output capture is approved' comments - Always include sendDefaultPii: true / send_default_pii=True in examples - Troubleshooting: mention explicit override as alternative to sendDefaultPii - Remove conditional 'Recommended path' prose Co-Authored-By: Claude (claude-sonnet-4-20250514) --- skills/sentry-elixir-sdk/SKILL.md | 2 +- skills/sentry-nestjs-sdk/references/ai-monitoring.md | 10 +++++----- skills/sentry-nextjs-sdk/references/ai-monitoring.md | 12 ++++++------ skills/sentry-node-sdk/references/ai-monitoring.md | 12 ++++++------ skills/sentry-python-sdk/references/ai-monitoring.md | 4 ++-- skills/sentry-setup-ai-monitoring/SKILL.md | 11 +++++------ 6 files changed, 25 insertions(+), 26 deletions(-) diff --git a/skills/sentry-elixir-sdk/SKILL.md b/skills/sentry-elixir-sdk/SKILL.md index 5920a34..4085e94 100644 --- a/skills/sentry-elixir-sdk/SKILL.md +++ b/skills/sentry-elixir-sdk/SKILL.md @@ -291,7 +291,7 @@ For each feature: `Read ${SKILL_ROOT}/references/.md`, follow steps exa ### Default PII Guidance -Most Sentry SDKs expose a send-default-PII option that should be recommended when privacy policy and user disclosures permit. As of sentry v12, the Elixir SDK does not expose a `send_default_pii` config option in its documented option list or current config schema, so do **not** add a non-existent option. For richer user context, use `Sentry.PlugContext` and explicitly set allowed fields with `Sentry.Context.set_user_context/1`, then scrub with `:before_send` if needed. If a future Elixir SDK release adds `send_default_pii`, recommend setting it when permitted. +Most Sentry SDKs expose a send-default-PII option. As of sentry v12, the Elixir SDK does not expose a `send_default_pii` config option in its documented option list or current config schema, so do **not** add a non-existent option. For richer user context, use `Sentry.PlugContext` and explicitly set allowed fields with `Sentry.Context.set_user_context/1`, then scrub with `:before_send` if needed. If a future Elixir SDK release adds `send_default_pii`, recommend setting it. ### Environment Variables diff --git a/skills/sentry-nestjs-sdk/references/ai-monitoring.md b/skills/sentry-nestjs-sdk/references/ai-monitoring.md index d4d3fce..dfde887 100644 --- a/skills/sentry-nestjs-sdk/references/ai-monitoring.md +++ b/skills/sentry-nestjs-sdk/references/ai-monitoring.md @@ -39,7 +39,7 @@ All integrations listed below are **auto-enabled** when the corresponding AI lib ### Auto-Enabled Setup -OpenAI is auto-instrumented — no changes to `instrument.ts` needed. Set `sendDefaultPii: true` when prompt/output capture is approved: +OpenAI is auto-instrumented — no changes to `instrument.ts` needed: ```typescript // instrument.ts @@ -117,7 +117,7 @@ Sentry.init({ dsn: process.env.SENTRY_DSN, tracesSampleRate: 1.0, streamGenAiSpans: true, - sendDefaultPii: true, // recommended when prompt/output capture is approved + sendDefaultPii: true, integrations: [ Sentry.vercelAIIntegration(), ], @@ -186,7 +186,7 @@ Sentry.init({ dsn: process.env.SENTRY_DSN, tracesSampleRate: 1.0, streamGenAiSpans: true, - sendDefaultPii: true, // recommended when prompt/output capture is approved + sendDefaultPii: true, integrations: [ Sentry.anthropicAIIntegration(), ], @@ -245,7 +245,7 @@ Sentry automatically captures token usage following OpenTelemetry GenAI semantic `recordInputs` captures prompts sent to the AI API. `recordOutputs` captures the generated text/completions returned. -Both default to `true` only when `sendDefaultPii: true` is set. Recommend this path when privacy policy and user consent allow prompt/output capture: +Both default to `true` only when `sendDefaultPii: true` is set: ```typescript Sentry.init({ @@ -347,7 +347,7 @@ If your `tracesSampleRate` is below 1.0, you may be losing entire agent runs. Se |-------|----------| | No AI spans appearing | Verify `tracesSampleRate` > 0; AI monitoring requires tracing | | Token counts missing in streams | Add `stream_options: { include_usage: true }` to all OpenAI streaming calls | -| `recordInputs`/`recordOutputs` not capturing | Set `sendDefaultPii: true`; check no integration or callsite override sets recording to `false` | +| `recordInputs`/`recordOutputs` not capturing | Set `sendDefaultPii: true`, or explicitly pass `recordInputs: true` / `recordOutputs: true` to the integration | | Anthropic spans missing | Check SDK version; add `anthropicAIIntegration()` explicitly | | Cost estimates not showing | Model name must match models.dev/OpenRouter pricing data; custom models may show no estimate | | Vercel AI spans not tracked | Pass `experimental_telemetry: { isEnabled: true }` to every AI SDK call | diff --git a/skills/sentry-nextjs-sdk/references/ai-monitoring.md b/skills/sentry-nextjs-sdk/references/ai-monitoring.md index 69f88f5..e178944 100644 --- a/skills/sentry-nextjs-sdk/references/ai-monitoring.md +++ b/skills/sentry-nextjs-sdk/references/ai-monitoring.md @@ -53,7 +53,7 @@ Sentry.init({ // Tracing MUST be enabled for AI monitoring tracesSampleRate: 1.0, streamGenAiSpans: true, - sendDefaultPii: true, // recommended when prompt/output capture is approved + sendDefaultPii: true, integrations: [ Sentry.openAIIntegration(), // recordInputs/recordOutputs default to true with sendDefaultPii @@ -63,7 +63,7 @@ Sentry.init({ ### Client-Side / Manual Wrapping -Prompt/output capture assumes the matching client-side `Sentry.init()` also sets `sendDefaultPii: true` after approval. +Prompt/output capture assumes the matching client-side `Sentry.init()` also sets `sendDefaultPii: true`. ```typescript import OpenAI from "openai"; @@ -121,7 +121,7 @@ Sentry.init({ dsn: process.env.SENTRY_DSN, tracesSampleRate: 1.0, streamGenAiSpans: true, - sendDefaultPii: true, // recommended when prompt/output capture is approved + sendDefaultPii: true, integrations: [ Sentry.vercelAIIntegration({ force: true, // ← Required for Vercel production deployments (see note below) @@ -138,7 +138,7 @@ Sentry.init({ dsn: process.env.SENTRY_DSN, tracesSampleRate: 1.0, streamGenAiSpans: true, - sendDefaultPii: true, // recommended when prompt/output capture is approved + sendDefaultPii: true, integrations: [ Sentry.vercelAIIntegration(), ], @@ -214,7 +214,7 @@ Sentry.init({ dsn: process.env.SENTRY_DSN, tracesSampleRate: 1.0, streamGenAiSpans: true, - sendDefaultPii: true, // recommended when prompt/output capture is approved + sendDefaultPii: true, integrations: [ Sentry.anthropicAIIntegration(), ], @@ -407,7 +407,7 @@ If your `tracesSampleRate` is below 1.0, you may be losing entire agent runs. Se | No AI spans appearing | Verify `tracesSampleRate` > 0; AI monitoring requires tracing | | Token counts missing in streams | Add `stream_options: { include_usage: true }` to all OpenAI streaming calls | | Vercel AI spans show raw names (`ai.toolCall`) | Add `vercelAIIntegration({ force: true })` in server config | -| `recordInputs`/`recordOutputs` not capturing | Set `sendDefaultPii: true`; check no integration or callsite override sets recording to `false` | +| `recordInputs`/`recordOutputs` not capturing | Set `sendDefaultPii: true`, or explicitly pass `recordInputs: true` / `recordOutputs: true` to the integration | | Anthropic spans missing | Check SDK version supports Anthropic integration; add `anthropicAIIntegration()` explicitly | | Cost estimates not showing | Model name must match models.dev/OpenRouter pricing data; custom/fine-tuned models may show no estimate | | Edge runtime AI spans missing | Add `vercelAIIntegration()` to `sentry.edge.config.ts` explicitly (not auto-enabled for Edge) | diff --git a/skills/sentry-node-sdk/references/ai-monitoring.md b/skills/sentry-node-sdk/references/ai-monitoring.md index 84b6cc9..f0a44d8 100644 --- a/skills/sentry-node-sdk/references/ai-monitoring.md +++ b/skills/sentry-node-sdk/references/ai-monitoring.md @@ -11,7 +11,7 @@ Sentry.init({ dsn: "...", tracesSampleRate: 1.0, streamGenAiSpans: true, - // Add sendDefaultPii: true when prompt/output capture is approved. + sendDefaultPii: true, }); ``` @@ -36,7 +36,7 @@ Sentry.init({ | `true` | `true` (default) | Yes | | `true` | `false` | No | -Recommended path: when privacy policy and user consent allow capturing AI inputs/outputs, set `sendDefaultPii: true` in `Sentry.init()` and let supported integrations default `recordInputs`/`recordOutputs` to `true`. Use integration-level options to opt out or override specific integrations. +Set `sendDefaultPii: true` in `Sentry.init()` to let supported integrations default `recordInputs`/`recordOutputs` to `true`. Use integration-level options to opt out or override specific integrations. ## Configuration Examples @@ -54,14 +54,14 @@ Sentry.init({ // OpenAI, Anthropic, LangChain, LangGraph, Google GenAI activate automatically ``` -### Explicit configuration with sendDefaultPii defaults +### Explicit configuration with recordInputs/recordOutputs override ```typescript Sentry.init({ dsn: process.env.SENTRY_DSN, tracesSampleRate: 1.0, streamGenAiSpans: true, - sendDefaultPii: true, // recommended when prompt/output capture is approved + sendDefaultPii: true, integrations: [ Sentry.openAIIntegration(), Sentry.vercelAIIntegration(), @@ -152,7 +152,7 @@ await Sentry.startSpan({ | `gen_ai.operation.name` | string | No | Human-readable operation label | | `gen_ai.agent.name` | string | No | Agent name (for agent spans) | -### Content attributes (PII-gated — requires `sendDefaultPii: true` and no integration-level recording opt-out) +### Content attributes (PII-gated — only when `sendDefaultPii: true` + `recordInputs/recordOutputs: true`) | Attribute | Type | Description | |-----------|------|-------------| @@ -218,6 +218,6 @@ If `tracesSampleRate` < 1.0, see the [AI sampling guide](../../sentry-setup-ai-m | Token counts missing in streams | Add `stream_options: { include_usage: true }` (OpenAI) | | Vercel AI spans not tracked | Add `experimental_telemetry: { isEnabled: true }` per call | | Browser OpenAI not traced | Use `Sentry.instrumentOpenAiClient()` - auto-instrumentation is server-only | -| Prompts not captured | Set `sendDefaultPii: true`; check no integration or callsite override sets recording to `false` | +| Prompts not captured | Set `sendDefaultPii: true`, or explicitly pass `recordInputs: true` / `recordOutputs: true` to the integration | | AI Agents Dashboard empty | Ensure traces are being sent; check DSN and `tracesSampleRate` | | Wrong cost calculations | Cached/reasoning tokens are subsets of totals, not additions | diff --git a/skills/sentry-python-sdk/references/ai-monitoring.md b/skills/sentry-python-sdk/references/ai-monitoring.md index dd6b3ab..530f570 100644 --- a/skills/sentry-python-sdk/references/ai-monitoring.md +++ b/skills/sentry-python-sdk/references/ai-monitoring.md @@ -11,7 +11,7 @@ sentry_sdk.init( dsn="...", traces_sample_rate=1.0, stream_gen_ai_spans=True, - # Add send_default_pii=True when prompt/output capture is approved. + send_default_pii=True, ) ``` @@ -42,7 +42,7 @@ Every integration follows the same two-layer control: | `True` | `True` (default) | ✅ Yes | | `True` | `False` | ❌ No | -Recommended path: when privacy policy and user consent allow capturing AI inputs/outputs, set `send_default_pii=True` in `sentry_sdk.init()` and leave `include_prompts` at its default `True`. Use `include_prompts=False` per integration only to opt out. +Set `send_default_pii=True` in `sentry_sdk.init()` and leave `include_prompts` at its default `True`. Use `include_prompts=False` per integration only to opt out. ## Configuration Examples diff --git a/skills/sentry-setup-ai-monitoring/SKILL.md b/skills/sentry-setup-ai-monitoring/SKILL.md index c21c498..5a7ee2c 100644 --- a/skills/sentry-setup-ai-monitoring/SKILL.md +++ b/skills/sentry-setup-ai-monitoring/SKILL.md @@ -33,7 +33,7 @@ AI monitoring requires **tracing enabled** (`tracesSampleRate > 0`). - Captured data complies with applicable regulations (GDPR, CCPA, etc.) - Sentry data retention settings are appropriate for the sensitivity of the data -**Ask the user** whether they want prompt/output capture enabled. When they confirm, recommend enabling the SDK's send-default-PII option first, then use integration-level options only to override defaults. Do not enable prompt/output capture without explicit confirmation. Use `tracesSampleRate: 1.0` only in development; in production, use a lower value or a `tracesSampler` function. +**Ask the user** whether they want prompt/output capture enabled. Do not enable prompt/output capture without explicit confirmation. Use `tracesSampleRate: 1.0` only in development; in production, use a lower value or a `tracesSampler` function. ## Detection First @@ -119,7 +119,7 @@ Sentry.init({ dsn: "YOUR_DSN", tracesSampleRate: 1.0, streamGenAiSpans: true, - sendDefaultPii: true, // Recommended when prompt/output capture is approved + sendDefaultPii: true, integrations: [ Sentry.openAIIntegration({ // recordInputs/recordOutputs default to true when sendDefaultPii is true @@ -147,7 +147,7 @@ Sentry.init({ dsn: "YOUR_DSN", tracesSampleRate: 1.0, streamGenAiSpans: true, - sendDefaultPii: true, // Recommended when prompt/output capture is approved + sendDefaultPii: true, integrations: [ Sentry.langChainIntegration(), Sentry.langGraphIntegration(), @@ -157,7 +157,7 @@ Sentry.init({ ### Vercel AI SDK -Add to `sentry.edge.config.ts` for Edge runtime. Include `sendDefaultPii: true` once prompt/output capture is approved: +Add to `sentry.edge.config.ts` for Edge runtime: ```javascript Sentry.init({ dsn: "YOUR_DSN", @@ -192,8 +192,7 @@ sentry_sdk.init( dsn="YOUR_DSN", traces_sample_rate=1.0, # Lower in production (e.g., 0.1) stream_gen_ai_spans=True, # SDK ≥2.60.0 - # Recommended once prompt/output capture is approved: - # send_default_pii=True, # required for prompt/output capture (sends user PII) + send_default_pii=True, # Integrations auto-enable when the AI package is installed. # Only specify explicitly to customize (e.g., include_prompts): # integrations=[OpenAIIntegration(include_prompts=True)],