Files
klz-cables.com/.pnpm-store/v10/files/e8/1215f84beae6b5400e6f4d9c2e0732f9aba5ee9c8683a23afceb0d239634aa44353194e8e1e0d4ac626b2dc08b6ad0bcffb44c5ba285ce471bc808c81170b7
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

1 line
2.9 KiB
Plaintext

{"version":3,"file":"providerSkip.js","sources":["../../../../src/utils/ai/providerSkip.ts"],"sourcesContent":["import { DEBUG_BUILD } from '../../debug-build';\nimport { debug } from '../debug-logger';\n\n/**\n * Registry tracking which AI provider modules should skip instrumentation wrapping.\n *\n * This prevents duplicate spans when a higher-level integration (like LangChain)\n * already instruments AI providers at a higher abstraction level.\n */\nconst SKIPPED_AI_PROVIDERS = new Set<string>();\n\n/**\n * Mark AI provider modules to skip instrumentation wrapping.\n *\n * This prevents duplicate spans when a higher-level integration (like LangChain)\n * already instruments AI providers at a higher abstraction level.\n *\n * @internal\n * @param modules - Array of npm module names to skip (e.g., '@anthropic-ai/sdk', 'openai')\n *\n * @example\n * ```typescript\n * // In LangChain integration\n * _INTERNAL_skipAiProviderWrapping(['@anthropic-ai/sdk', 'openai', '@google/generative-ai']);\n * ```\n */\nexport function _INTERNAL_skipAiProviderWrapping(modules: string[]): void {\n modules.forEach(module => {\n SKIPPED_AI_PROVIDERS.add(module);\n DEBUG_BUILD && debug.log(`AI provider \"${module}\" wrapping will be skipped`);\n });\n}\n\n/**\n * Check if an AI provider module should skip instrumentation wrapping.\n *\n * @internal\n * @param module - The npm module name (e.g., '@anthropic-ai/sdk', 'openai')\n * @returns true if wrapping should be skipped\n *\n * @example\n * ```typescript\n * // In AI provider instrumentation\n * if (_INTERNAL_shouldSkipAiProviderWrapping('@anthropic-ai/sdk')) {\n * return Reflect.construct(Original, args); // Don't instrument\n * }\n * ```\n */\nexport function _INTERNAL_shouldSkipAiProviderWrapping(module: string): boolean {\n return SKIPPED_AI_PROVIDERS.has(module);\n}\n\n/**\n * Clear all AI provider skip registrations.\n *\n * This is automatically called at the start of Sentry.init() to ensure a clean state\n * between different client initializations.\n *\n * @internal\n */\nexport function _INTERNAL_clearAiProviderSkips(): void {\n SKIPPED_AI_PROVIDERS.clear();\n DEBUG_BUILD && debug.log('Cleared AI provider skip registrations');\n}\n"],"names":[],"mappings":";;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,oBAAA,GAAuB,IAAI,GAAG,EAAU;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,gCAAgC,CAAC,OAAO,EAAkB;AAC1E,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU;AAC5B,IAAI,oBAAoB,CAAC,GAAG,CAAC,MAAM,CAAC;AACpC,IAAI,WAAA,IAAe,KAAK,CAAC,GAAG,CAAC,CAAC,aAAa,EAAE,MAAM,CAAC,0BAA0B,CAAC,CAAC;AAChF,EAAE,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,sCAAsC,CAAC,MAAM,EAAmB;AAChF,EAAE,OAAO,oBAAoB,CAAC,GAAG,CAAC,MAAM,CAAC;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,8BAA8B,GAAS;AACvD,EAAE,oBAAoB,CAAC,KAAK,EAAE;AAC9B,EAAE,eAAe,KAAK,CAAC,GAAG,CAAC,wCAAwC,CAAC;AACpE;;;;"}