Skip to content

Commit 43a3e3e

Browse files
committed
fix(instrumentation-langchain): incorrect string syntax resulting in non-usage of variable in span name creation, also added extra test file, and fixed issues with existing tests (testing now covers ~80%)
1 parent 1c3b6ee commit 43a3e3e

File tree

4 files changed

+1028
-103
lines changed

4 files changed

+1028
-103
lines changed

packages/instrumentation-langchain/src/callback-handler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ export class OpenTelemetryCallbackHandler extends BaseCallbackHandler {
417417
name = chain.id[chain.id.length - 1];
418418
}
419419

420-
const spanName = `chain \${name}`;
420+
const spanName = `chain ${name}`;
421421
const span = this._createSpan(
422422
runId,
423423
parentRunId,
@@ -481,7 +481,7 @@ export class OpenTelemetryCallbackHandler extends BaseCallbackHandler {
481481
if (name === undefined && tool.id) {
482482
name = tool.id[tool.id.length - 1];
483483
}
484-
const spanName = `execute_tool \${name}`;
484+
const spanName = `execute_tool ${name}`;
485485
const span = this._createSpan(
486486
runId,
487487
parentRunId,

0 commit comments

Comments
 (0)