Skip to content

Commit a5eac4a

Browse files
docs(js): Link wrapMcpServerWithSentry and document mcp defaults for MCP servers (#20106)
1 parent ff6a00b commit a5eac4a

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎docs/platforms/javascript/common/configuration/options.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ For more on what data Sentry collects and how to control it, see <PlatformLink t
139139
| `httpBodies` | `HttpBodyCollectionTarget[]` | all types | Body types to collect: `"incomingRequest"`, `"outgoingRequest"`, `"incomingResponse"`, `"outgoingResponse"`. Set to `[]` to disable. |
140140
| `urlQueryParams` | `CollectBehavior` | `true` | Collect URL query parameters. Parameter names are always included. The SDK replaces the values of sensitive parameters with `[Filtered]`. |
141141
| `graphQL` | `{ document?, variables? }` | both `true` | `document`: Collect the GraphQL document (the query or mutation source text). <br /><br /> `variables`: Collect the variables that are passed to GraphQL operations. <br /><br /> The operation name and type are always collected. |
142-
| `genAI` | `{ inputs?, outputs? }` | both `true` | `inputs`: Collect the content of generative AI inputs: system instructions, prompt messages, tool definitions, and tool call arguments. <br /><br /> `outputs`: Collect the content of generative AI outputs, such as completion text and tool call results. <br /><br /> Metadata, such as the model name and token counts, is always collected. Options set on an AI integration take precedence over these values. |
143-
| `mcp` | `{ inputs?, outputs? }` | both `true` | Available in SDK version `11.9.0` and above. <br /><br /> `inputs`: Collect the content of incoming MCP requests, such as tool call arguments, prompt arguments, and the payload of MCP logging notifications. <br /><br /> `outputs`: Collect the content of MCP responses, such as tool results and prompt result messages. <br /><br /> Metadata, such as the method name, the tool or prompt name, and error status, is always collected. A field you don't set falls back to the matching `genAI` field. The `recordInputs` and `recordOutputs` options of `wrapMcpServerWithSentry` take precedence over these values. |
142+
| `genAI` | `{ inputs?, outputs? }` | both `true` | `inputs`: Collect the content of generative AI inputs: system instructions, prompt messages, tool definitions, and tool call arguments. <br /><br /> `outputs`: Collect the content of generative AI outputs, such as completion text and tool call results. <br /><br /> Metadata, such as the model name and token counts, is always collected. Options set on an AI integration take precedence over these values. <br /><br /> For instrumented MCP servers, `mcp` takes precedence over these values. |
143+
| `mcp` | `{ inputs?, outputs? }` | both `true` | Available in SDK version `11.9.0` and above. <br /><br /> `inputs`: Collect the content of incoming MCP requests, such as tool call arguments, prompt arguments, and the payload of MCP logging notifications. <br /><br /> `outputs`: Collect the content of MCP responses, such as tool results and prompt result messages. <br /><br /> Metadata, such as the method name, the tool or prompt name, and error status, is always collected. A field you don't set falls back to the matching `genAI` field. The `recordInputs` and `recordOutputs` options of [`wrapMcpServerWithSentry`](/platform-redirect/?next=%2Fmcp-monitoring%2F) take precedence over these values. |
144144
| `databaseQueryData` | `boolean` | `true` | Collect the data associated with database queries: bound query parameters, data payloads for write operations, and returned result data. <br /><br /> The sanitized or parameterized query text (`db.query.text`) is **not** controlled by this option. Structural metadata, such as the database system, query summary, operation name, and table, is also **always** collected. |
145145
| `queues` | `boolean` | `true` | Collect the arguments passed to tasks within queues. For Kafka, this is the message key. Structural metadata, such as the messaging system, the destination name, and the operation, is always collected. |
146146
| `stackFrameVariables` | `CollectBehavior` | `true` | Capture local variable values in stack frames. Allow/deny lists match variable names. |

‎docs/platforms/javascript/common/data-management/data-collected/index.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ Sentry.init({
309309

310310
If you don't set a field of `dataCollection.mcp`, the SDK uses the matching `dataCollection.genAI` field instead. In SDK versions before `11.9.0`, `dataCollection.genAI` is the only global setting for MCP content.
311311

312-
To control recording for a specific server, use the `recordInputs` and `recordOutputs` options of <PlatformLink to="/mcp-monitoring/">`wrapMcpServerWithSentry`</PlatformLink>. They take precedence over the `dataCollection` settings.
312+
To control recording for a specific server, use the `recordInputs` and `recordOutputs` options of <PlatformLink to="/mcp-monitoring/#configure-input-and-output-recording">`wrapMcpServerWithSentry`</PlatformLink>. They take precedence over the `dataCollection` settings.
313313
</PlatformCategorySection>
314314
</PlatformSection>
315315

‎docs/product/mcp-servers/getting-started.mdx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,23 @@ On Cloudflare Workers, automatic instrumentation requires building with the Sent
5454

5555
#### Options
5656

57-
Pass these options to `wrapMcpServerWithSentry` to configure a specific server, including one the SDK already instrumented automatically. The `recordInputs` and `recordOutputs` options require Sentry JavaScript SDK version `10.33.0` or newer.
57+
Pass these options to [`wrapMcpServerWithSentry`](/platform-redirect/?next=%2Fmcp-monitoring%2F) to configure a specific server, including one the SDK already instrumented automatically. The `recordInputs` and `recordOutputs` options require Sentry JavaScript SDK version `10.33.0` or newer.
5858

5959
##### `recordInputs`
6060

6161
_Type: `boolean`_
6262

6363
Records inputs to MCP tool and prompt calls (such as tool arguments and prompt parameters).
6464

65-
Defaults to `dataCollection.genAI.inputs`. In Sentry JavaScript SDK 10.x, when `dataCollection` isn't configured, this follows `sendDefaultPii`.
65+
Defaults to `dataCollection.mcp.inputs`, then `dataCollection.genAI.inputs`. Before Sentry JavaScript SDK `11.9.0`, only `dataCollection.genAI.inputs` applies. In Sentry JavaScript SDK 10.x, when `dataCollection` isn't configured, this follows `sendDefaultPii`.
6666

6767
##### `recordOutputs`
6868

6969
_Type: `boolean`_
7070

7171
Records outputs from MCP tool and prompt calls (such as tool results and prompt messages).
7272

73-
Defaults to `dataCollection.genAI.outputs`. In Sentry JavaScript SDK 10.x, when `dataCollection` isn't configured, this follows `sendDefaultPii`.
73+
Defaults to `dataCollection.mcp.outputs`, then `dataCollection.genAI.outputs`. Before Sentry JavaScript SDK `11.9.0`, only `dataCollection.genAI.outputs` applies. In Sentry JavaScript SDK 10.x, when `dataCollection` isn't configured, this follows `sendDefaultPii`.
7474

7575
#### Cloudflare Workers
7676

0 commit comments

Comments
 (0)