feat(langchain): Record run_name as gen_ai.function_id on Invoke Agent Spans
#5926
+472
−3
@sentry/warden / warden
completed
Apr 22, 2026 in 3m 18s
1 issue
Low
Unnecessary list() call on invoke() return value - `tests/integrations/langchain/test_langchain.py:795-800`
The test wraps agent_executor.invoke() with list(), but invoke() returns a dictionary, not an iterator. Using list() on a dict produces a list of keys (e.g., ['input', 'output']), which is not meaningful for this test. Unlike stream() which returns an iterator that should be consumed with list(), invoke() returns the result directly. While this doesn't cause the test to fail (the invoke still runs and span data is captured), it's misleading code that suggests the API works differently than it does.
Also found at:
tests/integrations/langchain/test_langchain.py:1090-1094
4 skills analyzed
| Skill | Findings | Duration | Cost |
|---|---|---|---|
| code-review | 0 | 3m 16s | $1.26 |
| find-bugs | 1 | 3m 7s | $1.56 |
| skill-scanner | 0 | 2m 17s | $0.42 |
| security-review | 0 | 1m 3s | $0.45 |
Duration: 9m 43s · Tokens: 2.3M in / 27.3k out · Cost: $3.70 (+extraction: $0.01, +merge: $0.00, +fix_gate: $0.00)
Loading