diff --git a/docs/platforms/javascript/common/configuration/integrations/vercelai.mdx b/docs/platforms/javascript/common/configuration/integrations/vercelai.mdx
index a015fe29174c5..d9fdd6a0ff67d 100644
--- a/docs/platforms/javascript/common/configuration/integrations/vercelai.mdx
+++ b/docs/platforms/javascript/common/configuration/integrations/vercelai.mdx
@@ -6,6 +6,7 @@ supported:
- javascript.aws-lambda
- javascript.azure-functions
- javascript.connect
+ - javascript.deno
- javascript.express
- javascript.fastify
- javascript.gcp-functions
@@ -28,7 +29,8 @@ supported:
-This integration only works in the Node.js, Cloudflare Workers, Vercel Edge Functions and Bun runtimes. Requires SDK version ``10.6.0` or higher.
+Requires SDK version `10.6.0` or higher for Node.js, Cloudflare Workers, Vercel Edge Functions and Bun.
+Requires SDK version `10.12.0` or higher for Deno.
diff --git a/docs/platforms/javascript/common/tracing/instrumentation/ai-agents-module.mdx b/docs/platforms/javascript/common/tracing/instrumentation/ai-agents-module.mdx
index ce2fff20dc77a..a87d2e4876eea 100644
--- a/docs/platforms/javascript/common/tracing/instrumentation/ai-agents-module.mdx
+++ b/docs/platforms/javascript/common/tracing/instrumentation/ai-agents-module.mdx
@@ -34,12 +34,27 @@ As a prerequisite to setting up AI Agent Monitoring with JavaScript, you'll need
The JavaScript SDK supports automatic instrumentation for some AI libraries. We recommend adding their integrations to your Sentry configuration to automatically capture spans for AI agents.
--
- Vercel AI SDK
-
-- OpenAI
-- Anthropic
-- Google Gen AI SDK
+
+ - Vercel AI SDK
+
+
+ - OpenAI
+
+
+ - Anthropic
+
+
+ - Google Gen AI SDK
+
## Manual Instrumentation
diff --git a/src/components/platformLink.tsx b/src/components/platformLink.tsx
index 2d53544cb0074..0ecd7e85ea81c 100644
--- a/src/components/platformLink.tsx
+++ b/src/components/platformLink.tsx
@@ -1,20 +1,76 @@
-import {getCurrentPlatformOrGuide} from 'sentry-docs/docTree';
+import {getCurrentPlatformOrGuide, getPlatform} from 'sentry-docs/docTree';
import {serverContext} from 'sentry-docs/serverContext';
+import {Platform, PlatformGuide} from 'sentry-docs/types';
import {SmartLink} from './smartLink';
+function getPlatformsWithFallback(
+ rootNode: any,
+ platformOrGuide: Platform | PlatformGuide
+) {
+ const result = [platformOrGuide.key];
+ let curPlatform: Platform | PlatformGuide | undefined = platformOrGuide;
+ while (curPlatform?.fallbackPlatform) {
+ result.push(curPlatform.fallbackPlatform);
+ curPlatform = getPlatform(rootNode, curPlatform.fallbackPlatform);
+ }
+ return result;
+}
+
+const isSupported = (
+ platformKey: string,
+ supported: string[],
+ notSupported: string[]
+): boolean | null => {
+ if (supported.length && supported.find(p => p === platformKey)) {
+ return true;
+ }
+ if (notSupported.length && notSupported.find(p => p === platformKey)) {
+ return false;
+ }
+ return null;
+};
+
type Props = {
children: React.ReactNode;
+ notSupported?: string[];
+ supported?: string[];
to?: string;
};
-export function PlatformLink({children, to}: Props) {
+export function PlatformLink({children, to, supported = [], notSupported = []}: Props) {
if (!to) {
return children;
}
const {rootNode, path} = serverContext();
const currentPlatformOrGuide = getCurrentPlatformOrGuide(rootNode, path);
+
+ // Check platform support if we have a current platform and support constraints
+ if (currentPlatformOrGuide && (supported.length > 0 || notSupported.length > 0)) {
+ const platformsToSearch = getPlatformsWithFallback(rootNode, currentPlatformOrGuide);
+
+ let result: boolean | null = null;
+ // eslint-disable-next-line no-cond-assign
+ for (let platformKey: string, i = 0; (platformKey = platformsToSearch[i]); i++) {
+ if (!platformKey) {
+ continue;
+ }
+ result = isSupported(platformKey, supported, notSupported);
+ if (result === false) {
+ // Platform is not supported, hide completely
+ return null;
+ }
+ if (result === true) {
+ break;
+ }
+ }
+ if (result === null && supported.length) {
+ // No supported platform found, hide completely
+ return null;
+ }
+ }
+
let href: string;
if (currentPlatformOrGuide) {
href = currentPlatformOrGuide.url + to.slice(1);