@tomflow/chatloop-extension 0.4.10 → 0.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/extension/manifest.json
CHANGED
|
@@ -171,8 +171,11 @@ chrome.runtime.onMessage.addListener((message,sender,reply)=>{
|
|
|
171
171
|
'CHAT_LOOP_SESSION_START_RESULT_V1'].includes(type)&&
|
|
172
172
|
sender?.url===chrome.runtime.getURL('start.html')+'?requestId='+sourceId);
|
|
173
173
|
return workerApi.audit.observe('browser.dispatch.'+type,
|
|
174
|
-
|
|
174
|
+
// Read dispatchSpan only when the AOP invokes its target: onBegin has
|
|
175
|
+
// already allocated the child Span. Passing it as an eager argument
|
|
176
|
+
// captures undefined before onBegin and breaks Native parent linkage.
|
|
177
|
+
(msg,src,cb)=>onBrowserMessage(msg,src,cb,dispatchSpan),'browser',{
|
|
175
178
|
...(actionSource&&message.traceParent?{parent:message.traceParent}:{}),
|
|
176
179
|
onBegin:ids=>{dispatchSpan=ids;}
|
|
177
|
-
})(message,sender,respond
|
|
180
|
+
})(message,sender,respond);
|
|
178
181
|
});
|