diff --git a/static/app/gettingStartedDocs/javascript/agentMonitoring.tsx b/static/app/gettingStartedDocs/javascript/agentMonitoring.tsx index 1082a91bae7847..0e6277e285266f 100644 --- a/static/app/gettingStartedDocs/javascript/agentMonitoring.tsx +++ b/static/app/gettingStartedDocs/javascript/agentMonitoring.tsx @@ -349,7 +349,13 @@ const response = await client.responses.create({ } /** - * Browser instructions for agent monitoring configuration. + * This function is primarily intended for browser-only instructions. + * However, due to current technical limitations under investigation, + * some meta frameworks also rely on it. + * + * Since these frameworks support Vercel AI / Mastra options, + * we return server-side instructions from the Node.js agent + * monitoring function as well. */ export function agentMonitoring({ packageName = '@sentry/browser', @@ -368,6 +374,9 @@ export function agentMonitoring({ configure: params => { const selected = getAgentIntegration(params); + // The Vercel AI SDK (generateText, streamText) is server-side only to prevent API key exposure. + // Therefore, Node.js instructions is returned for this option. + // This option is only available in meta frameworks. if (selected === AgentIntegration.VERCEL_AI) { return nodeAgentMonitoring({ packageName, @@ -404,6 +413,9 @@ export function agentMonitoring({ verify: params => { const selected = getAgentIntegration(params); + // The Vercel AI SDK (generateText, streamText) is server-side only to prevent API key exposure. + // Therefore, Node.js instructions is returned for this option. + // This option is only available in meta frameworks. if (selected === AgentIntegration.VERCEL_AI) { return nodeAgentMonitoring({ packageName,