Skip to content

Commit 763e33b

Browse files
feat: add config override for langwatch to allow passing metadata as well (#5121)
1 parent a5a728f commit 763e33b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/components/src/handler.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,15 @@ export const additionalCallbacks = async (nodeData: INodeData, options: ICommonO
591591
})
592592

593593
const trace = langwatch.getTrace()
594+
595+
if (nodeData?.inputs?.analytics?.langWatch) {
596+
trace.update({
597+
metadata: {
598+
...nodeData?.inputs?.analytics?.langWatch
599+
}
600+
})
601+
}
602+
594603
callbacks.push(trace.getLangChainCallback())
595604
} else if (provider === 'arize') {
596605
const arizeApiKey = getCredentialParam('arizeApiKey', credentialData, nodeData)

0 commit comments

Comments
 (0)