Skip to content
Closed
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion docs/platforms/javascript/common/agent-tracing/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ Pick your AI stack. Some libraries auto-instrument; others need a short setup
"javascript.astro",
"javascript.aws-lambda",
"javascript.azure-functions",
"javascript.connect",
"javascript.express",
"javascript.fastify",
"javascript.gcp-functions",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ supported:
- javascript.mastra
- javascript.aws-lambda
- javascript.azure-functions
- javascript.connect
- javascript.express
- javascript.fastify
- javascript.gcp-functions
Expand Down

This file was deleted.

40 changes: 21 additions & 19 deletions docs/platforms/javascript/common/configuration/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -135,30 +135,31 @@ Sentry.init({
```

Data you set explicitly (for example, via <PlatformLink to="/apis/#setUser">`Sentry.setUser()`</PlatformLink>) is always sent, regardless of `dataCollection`.

</Alert>

</SdkOption>

<SdkOption name="dataCollection" type='DataCollection' availableSince="10.57.0">

Controls which categories of data the SDK collects automatically. All fields are optional.
By default the SDK collects rich debugging context (including user identity, request/response bodies, and generative AI content) and scrubs values whose keys match the built-in sensitive denylist (`auth`, `token`, `password`, and similar).
By default the SDK collects rich debugging context (including user identity, request/response bodies, and generative AI content) and scrubs values whose keys match the built-in sensitive denylist (`auth`, `token`, `password`, and similar).

For more on what data Sentry collects and how to control it, see <PlatformLink to="/data-management/">Data Management</PlatformLink>.

| Key | Type | Default | Description |
| --------------------- | ---------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `userInfo` | `boolean` | `true` | Populate `user.*` fields (`id`, `email`, `username`, `ip_address`) from instrumentation. For example, the SDK infers the IP address from an incoming HTTP request. Data you set with `Sentry.setUser()` is always sent. |
| `cookies` | `CollectBehavior` | `true` | Collect cookies. Cookie names are always included. The SDK replaces the values of sensitive cookies with `[Filtered]`. |
| `httpHeaders` | `CollectBehavior \| { request?, response? }` | both `true` | Collect HTTP request and response headers. Pass one `CollectBehavior` for both directions, or use `{ request, response }` to control each direction. Header names are always included. |
| `httpBodies` | `HttpBodyCollectionTarget[]` | all types | Body types to collect: `"incomingRequest"`, `"outgoingRequest"`, `"incomingResponse"`, `"outgoingResponse"`. Set to `[]` to disable. |
| `urlQueryParams` | `CollectBehavior` | `true` | Collect URL query parameters. Parameter names are always included. The SDK replaces the values of sensitive parameters with `[Filtered]`. |
| `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. |
| `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. |
| `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. |
| `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. |
| `stackFrameVariables` | `boolean` | `true` | Capture local variable values in stack frames. |
| `frameContextLines` | `number` | `5` | Number of source code lines captured above and below each stack frame. |
| Key | Type | Default | Description |
| --------------------- | -------------------------------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `userInfo` | `boolean` | `true` | Populate `user.*` fields (`id`, `email`, `username`, `ip_address`) from instrumentation. For example, the SDK infers the IP address from an incoming HTTP request. Data you set with `Sentry.setUser()` is always sent. |
| `cookies` | `CollectBehavior` | `true` | Collect cookies. Cookie names are always included. The SDK replaces the values of sensitive cookies with `[Filtered]`. |
| `httpHeaders` | `CollectBehavior \| { request?, response? }` | both `true` | Collect HTTP request and response headers. Pass one `CollectBehavior` for both directions, or use `{ request, response }` to control each direction. Header names are always included. |
| `httpBodies` | `HttpBodyCollectionTarget[]` | all types | Body types to collect: `"incomingRequest"`, `"outgoingRequest"`, `"incomingResponse"`, `"outgoingResponse"`. Set to `[]` to disable. |
| `urlQueryParams` | `CollectBehavior` | `true` | Collect URL query parameters. Parameter names are always included. The SDK replaces the values of sensitive parameters with `[Filtered]`. |
| `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. |
| `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. |
| `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. |
| `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. |
| `stackFrameVariables` | `boolean` | `true` | Capture local variable values in stack frames. |
| `frameContextLines` | `number` | `5` | Number of source code lines captured above and below each stack frame. |

The `cookies`, `httpHeaders`, and `urlQueryParams` categories accept a `CollectBehavior` value:

Expand Down Expand Up @@ -599,7 +600,7 @@ If you want to disable trace propagation, you can set this option to `[]`.

Controls which bindings on `env` receive tracing data over [RPC calls](https://developers.cloudflare.com/workers/runtime-apis/bindings/service-bindings/rpc/) to Durable Objects and other Workers. RPC has no headers, so the SDK appends the trace context as a trailing argument that an instrumented receiver strips again before your method runs.

String entries must match a binding name exactly, so `"DB"` matches `"DB"` but not `"MY_DB"`. Use a regular expression for pattern matching.
String entries must match a binding name exactly, so `"DB"` matches `"DB"` but not `"MY_DB"`. Use a regular expression for pattern matching.

Setting this option, with any value, also lets the Worker continue a trace that arrives on an incoming RPC call. So a Worker that both calls and receives needs only this one option. Setting an empty array, the Worker is a receiver that propagates nothing, and an entry for a binding the Worker never calls is ignored. Because unused entries are harmless, one list can serve every Worker and Durable Object in a deployment.

Expand Down Expand Up @@ -747,7 +748,7 @@ If set to `true`, the SDK adds the [W3C `traceparent` header](https://www.w3.org
This header is attached in addition to the `sentry-trace` and `baggage` headers.
Set this option to `true` if your backend services are instrumented with e.g. OpenTelemetry or other W3C Trace Context compatible libraries and you want to continue traces from the client.

<PlatformSection notSupported={["javascript.aws-lambda", "javascript.azure-functions", "javascript.connect", "javascript.cordova", "javascript.express", "javascript.fastify", "javascript.gcp-functions", "javascript.hapi", "javascript.hono", "javascript.koa", "javascript.nestjs", "javascript.nitro", "javascript.node"]}>
<PlatformSection notSupported={["javascript.aws-lambda", "javascript.azure-functions", "javascript.cordova", "javascript.express", "javascript.fastify", "javascript.gcp-functions", "javascript.hapi", "javascript.hono", "javascript.koa", "javascript.nestjs", "javascript.nitro", "javascript.node"]}>

**Important:** Make sure that your backend services' CORS configuration allows the `traceparent` header.
Otherwise, requests might be blocked.
Expand Down Expand Up @@ -801,7 +802,8 @@ Instead, <PlatformLink to="/tracing/streamed-spans" fallbackPlatform="javascript
Controls whether the `logger` APIs send logs to Sentry. Logs are captured by default. Set this option to `false` to disable log capturing.

<Alert>
On SDK versions below `10.71.0`, logs are opt-in. Set `enableLogs: true` in your `Sentry.init` to send them.
On SDK versions below `10.71.0`, logs are opt-in. Set `enableLogs: true` in
your `Sentry.init` to send them.
</Alert>

</SdkOption>
Expand All @@ -815,8 +817,8 @@ This function is called with a log object, and can return a modified log object,
## Metrics Options

<PlatformSection supported={["javascript.electron"]}>
**Note:** For Electron, metric options apply to the process where these options
are set.
**Note:** For Electron, metric options apply to the process where these
options are set.
</PlatformSection>

<SdkOption name="enableMetrics" type='boolean' defaultValue='true'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ notSupported:
- javascript.mastra
- javascript.aws-lambda
- javascript.azure-functions
- javascript.connect
- javascript.express
- javascript.fastify
- javascript.gcp-functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ This means that the `ClientOptions.integrations` property is the final array of
<PlatformSection supported={[
'javascript.node',
'javascript.azure-functions',
'javascript.connect',
'javascript.express',
'javascript.fastify',
'javascript.hapi',
Expand Down
4 changes: 2 additions & 2 deletions docs/platforms/javascript/common/crons/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ supportedCategories:

Once implemented, it'll allow you to get alerts and metrics to help you solve errors, detect timeouts, and prevent disruptions to your service.

<PlatformSection supported={['javascript.nextjs', 'javascript.sveltekit', 'javascript.remix', 'javascript.astro', 'javascript.bun', 'javascript.deno', 'javascript.cloudflare', 'javascript.node', 'javascript.aws-lambda', 'javascript.azure-functions', 'javascript.connect', 'javascript.express', "javascript.fastify", 'javascript.gcp-functions', 'javascript.hapi', 'javascript.hono', 'javascript.koa', 'javascript.nestjs', 'javascript.tanstackstart-react']}>
<PlatformSection supported={['javascript.nextjs', 'javascript.sveltekit', 'javascript.remix', 'javascript.astro', 'javascript.bun', 'javascript.deno', 'javascript.cloudflare', 'javascript.node', 'javascript.aws-lambda', 'javascript.azure-functions', 'javascript.express', "javascript.fastify", 'javascript.gcp-functions', 'javascript.hapi', 'javascript.hono', 'javascript.koa', 'javascript.nestjs', 'javascript.tanstackstart-react']}>

## Requirements

Expand All @@ -20,7 +20,7 @@ Once implemented, it'll allow you to get alerts and metrics to help you solve er

</PlatformSection>

<PlatformSection notSupported={['javascript.nextjs', 'javascript.sveltekit', 'javascript.remix', 'javascript.astro', 'javascript.bun', 'javascript.deno', 'javascript.cloudflare', 'javascript.node', 'javascript.aws-lambda', 'javascript.azure-functions', 'javascript.connect', 'javascript.express', 'javascript.fastify', 'javascript.gcp-functions', 'javascript.hapi', 'javascript.hono', 'javascript.koa', 'javascript.nestjs', 'javascript.tanstackstart-react']}>
<PlatformSection notSupported={['javascript.nextjs', 'javascript.sveltekit', 'javascript.remix', 'javascript.astro', 'javascript.bun', 'javascript.deno', 'javascript.cloudflare', 'javascript.node', 'javascript.aws-lambda', 'javascript.azure-functions', 'javascript.express', 'javascript.fastify', 'javascript.gcp-functions', 'javascript.hapi', 'javascript.hono', 'javascript.koa', 'javascript.nestjs', 'javascript.tanstackstart-react']}>

## Requirements

Expand Down
Loading
Loading