Files
klz-cables.com/.pnpm-store/v10/files/c2/62d9eef57b837551088af3ac0aa14baa346a7b63e9023b99d7f661c08c0c2992afdd5cf6a67e319b4392e1e10b8853d9523125328b9d775f97adbed445d9e2
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

36 lines
1.2 KiB
Plaintext

import { getCurrentScope, getIsolationScope } from '../currentScopes.js';
import { defineIntegration } from '../integration.js';
import { GEN_AI_CONVERSATION_ID_ATTRIBUTE } from '../semanticAttributes.js';
const INTEGRATION_NAME = 'ConversationId';
const _conversationIdIntegration = (() => {
return {
name: INTEGRATION_NAME,
setup(client) {
client.on('spanStart', (span) => {
const scopeData = getCurrentScope().getScopeData();
const isolationScopeData = getIsolationScope().getScopeData();
const conversationId = scopeData.conversationId || isolationScopeData.conversationId;
if (conversationId) {
span.setAttribute(GEN_AI_CONVERSATION_ID_ATTRIBUTE, conversationId);
}
});
},
};
}) ;
/**
* Automatically applies conversation ID from scope to spans.
*
* This integration reads the conversation ID from the current or isolation scope
* and applies it to spans when they start. This ensures the conversation ID is
* available for all AI-related operations.
*/
const conversationIdIntegration = defineIntegration(_conversationIdIntegration);
export { conversationIdIntegration };
//# sourceMappingURL=conversationId.js.map