feat(core): Improve Langsmith traces for AI executions (#9081)

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
oleg
2024-04-08 22:51:49 +02:00
committed by GitHub
parent 3bcfef95f6
commit 936682eeaa
18 changed files with 99 additions and 26 deletions

View File

@@ -24,6 +24,7 @@ import type {
ExecutionStatus,
ExecutionError,
EventNamesAiNodesType,
CallbackManager,
} from 'n8n-workflow';
import {
ApplicationError,
@@ -754,6 +755,7 @@ async function executeWorkflow(
loadedWorkflowData?: IWorkflowBase;
loadedRunData?: IWorkflowExecutionDataProcess;
parentWorkflowSettings?: IWorkflowSettings;
parentCallbackManager?: CallbackManager;
},
): Promise<Array<INodeExecutionData[] | null> | IWorkflowExecuteProcess> {
const internalHooks = Container.get(InternalHooks);
@@ -815,6 +817,7 @@ async function executeWorkflow(
workflowData,
);
additionalDataIntegrated.executionId = executionId;
additionalDataIntegrated.parentCallbackManager = options.parentCallbackManager;
// Make sure we pass on the original executeWorkflow function we received
// This one already contains changes to talk to parent process