Commit a8a1618
committed
refactor: use helper function in both places for agent extraction
Previously, both transformTelemetryMetadata and transformAiSdkSpanNames
had their own logic to extract agent name from ai.telemetry.metadata.agent
attributes. This consolidates both to use the shared getAgentNameFromAttributes
helper, eliminating code duplication.
Addresses PR feedback about existing agent extraction code.1 parent 15c7824 commit a8a1618
File tree
1 file changed
+2
-6
lines changed- packages/traceloop-sdk/src/lib/tracing
1 file changed
+2
-6
lines changedLines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
436 | | - | |
| 436 | + | |
| 437 | + | |
437 | 438 | | |
438 | 439 | | |
439 | 440 | | |
| |||
448 | 449 | | |
449 | 450 | | |
450 | 451 | | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | 452 | | |
457 | 453 | | |
458 | 454 | | |
| |||
0 commit comments