diff --git a/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx b/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx index cda0d4dbea740..15fcf5893763b 100644 --- a/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx +++ b/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx @@ -113,6 +113,33 @@ Sentry.init({ + + + + +### Streaming Gen AI Spans + +AI spans with large inputs and outputs can hit transaction payload size limits. Set `streamGenAiSpans` to `true` to send `gen_ai` spans as standalone envelope items instead of bundling them in the transaction. + +Enable this option if `gen_ai` spans are being dropped because the transaction payload exceeds size limits. + + + + +```javascript +import * as Sentry from "___SDK_PACKAGE___"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + tracesSampleRate: 1.0, + streamGenAiSpans: true, +}); +``` + + + + + ## Tracking Conversations