Skip to content

Commit 25fb075

Browse files
authored
fix(llmobs): fix span linking for langgraph nodes (#13423)
Fix for `langgraph>=0.3.22`. This includes expanding our testing range for `langgraph`, and it was determined we support as low as `langgraph==0.2.23`. Most LOC are from riot requirements fixes. Below is some additional context for how we do span linking/fix span linking for LangGraph. There are two other small fixes: 1. Subgraph detection was previously done by checking node names (`"LangGraph"` equality). Since (sub)graphs can be names, this is not viable, and instead we opt for an instance check. 2. For using the `Command` ([ref](https://blog.langchain.dev/command-a-new-tool-for-multi-agent-architectures-in-langgraph/)) and `goto` features in LangGraph will throw a `ParentCommand` exception to communicate to the parent graph. This is not a true error, so any instances of this error should not be tagged as such. MLOB-2774 ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
1 parent f8f97c1 commit 25fb075

31 files changed

+1423
-319
lines changed

.riot/requirements/11029c2.txt

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.12
3+
# by the following command:
4+
#
5+
# pip-compile --no-annotate .riot/requirements/11029c2.in
6+
#
7+
annotated-types==0.7.0
8+
anyio==4.9.0
9+
attrs==25.3.0
10+
certifi==2025.4.26
11+
charset-normalizer==3.4.2
12+
coverage[toml]==7.8.0
13+
h11==0.16.0
14+
httpcore==1.0.9
15+
httpx==0.28.1
16+
hypothesis==6.45.0
17+
idna==3.10
18+
iniconfig==2.1.0
19+
jsonpatch==1.33
20+
jsonpointer==3.0.0
21+
langchain-core==0.3.59
22+
langgraph==0.3.22
23+
langgraph-checkpoint==2.0.25
24+
langgraph-prebuilt==0.1.8
25+
langgraph-sdk==0.1.69
26+
langsmith==0.3.42
27+
mock==5.2.0
28+
opentracing==2.4.0
29+
orjson==3.10.18
30+
ormsgpack==1.9.1
31+
packaging==24.2
32+
pluggy==1.5.0
33+
pydantic==2.11.4
34+
pydantic-core==2.33.2
35+
pytest==8.3.5
36+
pytest-asyncio==0.26.0
37+
pytest-cov==6.1.1
38+
pytest-mock==3.14.0
39+
pyyaml==6.0.2
40+
requests==2.32.3
41+
requests-toolbelt==1.0.0
42+
sniffio==1.3.1
43+
sortedcontainers==2.4.0
44+
tenacity==9.1.2
45+
typing-extensions==4.13.2
46+
typing-inspection==0.4.0
47+
urllib3==2.4.0
48+
xxhash==3.5.0
49+
zstandard==0.23.0

.riot/requirements/115283d.txt

Lines changed: 0 additions & 42 deletions
This file was deleted.

.riot/requirements/125dc45.txt

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.9
3+
# by the following command:
4+
#
5+
# pip-compile --no-annotate .riot/requirements/125dc45.in
6+
#
7+
annotated-types==0.7.0
8+
anyio==4.9.0
9+
attrs==25.3.0
10+
certifi==2025.4.26
11+
charset-normalizer==3.4.2
12+
coverage[toml]==7.8.0
13+
exceptiongroup==1.3.0
14+
h11==0.16.0
15+
httpcore==1.0.9
16+
httpx==0.28.1
17+
hypothesis==6.45.0
18+
idna==3.10
19+
iniconfig==2.1.0
20+
jsonpatch==1.33
21+
jsonpointer==3.0.0
22+
langchain-core==0.3.59
23+
langgraph==0.3.21
24+
langgraph-checkpoint==2.0.25
25+
langgraph-prebuilt==0.1.8
26+
langgraph-sdk==0.1.69
27+
langsmith==0.3.42
28+
mock==5.2.0
29+
opentracing==2.4.0
30+
orjson==3.10.18
31+
ormsgpack==1.9.1
32+
packaging==24.2
33+
pluggy==1.5.0
34+
pydantic==2.11.4
35+
pydantic-core==2.33.2
36+
pytest==8.3.5
37+
pytest-asyncio==0.26.0
38+
pytest-cov==6.1.1
39+
pytest-mock==3.14.0
40+
pyyaml==6.0.2
41+
requests==2.32.3
42+
requests-toolbelt==1.0.0
43+
sniffio==1.3.1
44+
sortedcontainers==2.4.0
45+
tenacity==9.1.2
46+
tomli==2.2.1
47+
typing-extensions==4.13.2
48+
typing-inspection==0.4.0
49+
urllib3==2.4.0
50+
xxhash==3.5.0
51+
zstandard==0.23.0

.riot/requirements/158a309.txt

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.11
3+
# by the following command:
4+
#
5+
# pip-compile --no-annotate .riot/requirements/158a309.in
6+
#
7+
annotated-types==0.7.0
8+
anyio==4.9.0
9+
attrs==25.3.0
10+
certifi==2025.4.26
11+
charset-normalizer==3.4.2
12+
coverage[toml]==7.8.0
13+
h11==0.16.0
14+
httpcore==1.0.9
15+
httpx==0.28.1
16+
hypothesis==6.45.0
17+
idna==3.10
18+
iniconfig==2.1.0
19+
jsonpatch==1.33
20+
jsonpointer==3.0.0
21+
langchain-core==0.3.59
22+
langgraph==0.3.21
23+
langgraph-checkpoint==2.0.25
24+
langgraph-prebuilt==0.1.8
25+
langgraph-sdk==0.1.69
26+
langsmith==0.3.42
27+
mock==5.2.0
28+
opentracing==2.4.0
29+
orjson==3.10.18
30+
ormsgpack==1.9.1
31+
packaging==24.2
32+
pluggy==1.5.0
33+
pydantic==2.11.4
34+
pydantic-core==2.33.2
35+
pytest==8.3.5
36+
pytest-asyncio==0.26.0
37+
pytest-cov==6.1.1
38+
pytest-mock==3.14.0
39+
pyyaml==6.0.2
40+
requests==2.32.3
41+
requests-toolbelt==1.0.0
42+
sniffio==1.3.1
43+
sortedcontainers==2.4.0
44+
tenacity==9.1.2
45+
typing-extensions==4.13.2
46+
typing-inspection==0.4.0
47+
urllib3==2.4.0
48+
xxhash==3.5.0
49+
zstandard==0.23.0

.riot/requirements/1775c38.txt

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.11
3+
# by the following command:
4+
#
5+
# pip-compile --no-annotate .riot/requirements/1775c38.in
6+
#
7+
annotated-types==0.7.0
8+
anyio==4.9.0
9+
attrs==25.3.0
10+
certifi==2025.4.26
11+
charset-normalizer==3.4.2
12+
coverage[toml]==7.8.0
13+
h11==0.16.0
14+
httpcore==1.0.9
15+
httpx==0.28.1
16+
hypothesis==6.45.0
17+
idna==3.10
18+
iniconfig==2.1.0
19+
jsonpatch==1.33
20+
jsonpointer==3.0.0
21+
langchain-core==0.3.59
22+
langgraph==0.2.23
23+
langgraph-checkpoint==1.0.12
24+
langsmith==0.3.42
25+
mock==5.2.0
26+
msgpack==1.1.0
27+
opentracing==2.4.0
28+
orjson==3.10.18
29+
packaging==24.2
30+
pluggy==1.5.0
31+
pydantic==2.11.4
32+
pydantic-core==2.33.2
33+
pytest==8.3.5
34+
pytest-asyncio==0.26.0
35+
pytest-cov==6.1.1
36+
pytest-mock==3.14.0
37+
pyyaml==6.0.2
38+
requests==2.32.3
39+
requests-toolbelt==1.0.0
40+
sniffio==1.3.1
41+
sortedcontainers==2.4.0
42+
tenacity==9.1.2
43+
typing-extensions==4.13.2
44+
typing-inspection==0.4.0
45+
urllib3==2.4.0
46+
zstandard==0.23.0

.riot/requirements/18551a1.txt

Lines changed: 0 additions & 45 deletions
This file was deleted.

.riot/requirements/18eaa2d.txt

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.9
3+
# by the following command:
4+
#
5+
# pip-compile --no-annotate .riot/requirements/18eaa2d.in
6+
#
7+
annotated-types==0.7.0
8+
anyio==4.9.0
9+
attrs==25.3.0
10+
certifi==2025.4.26
11+
charset-normalizer==3.4.2
12+
coverage[toml]==7.8.0
13+
exceptiongroup==1.3.0
14+
h11==0.16.0
15+
httpcore==1.0.9
16+
httpx==0.28.1
17+
hypothesis==6.45.0
18+
idna==3.10
19+
iniconfig==2.1.0
20+
jsonpatch==1.33
21+
jsonpointer==3.0.0
22+
langchain-core==0.3.59
23+
langgraph==0.4.3
24+
langgraph-checkpoint==2.0.25
25+
langgraph-prebuilt==0.1.8
26+
langgraph-sdk==0.1.69
27+
langsmith==0.3.42
28+
mock==5.2.0
29+
opentracing==2.4.0
30+
orjson==3.10.18
31+
ormsgpack==1.9.1
32+
packaging==24.2
33+
pluggy==1.5.0
34+
pydantic==2.11.4
35+
pydantic-core==2.33.2
36+
pytest==8.3.5
37+
pytest-asyncio==0.26.0
38+
pytest-cov==6.1.1
39+
pytest-mock==3.14.0
40+
pyyaml==6.0.2
41+
requests==2.32.3
42+
requests-toolbelt==1.0.0
43+
sniffio==1.3.1
44+
sortedcontainers==2.4.0
45+
tenacity==9.1.2
46+
tomli==2.2.1
47+
typing-extensions==4.13.2
48+
typing-inspection==0.4.0
49+
urllib3==2.4.0
50+
xxhash==3.5.0
51+
zstandard==0.23.0

.riot/requirements/1d59ef9.txt

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.13
3+
# by the following command:
4+
#
5+
# pip-compile --no-annotate .riot/requirements/1d59ef9.in
6+
#
7+
annotated-types==0.7.0
8+
anyio==4.9.0
9+
attrs==25.3.0
10+
certifi==2025.4.26
11+
charset-normalizer==3.4.2
12+
coverage[toml]==7.8.0
13+
h11==0.16.0
14+
httpcore==1.0.9
15+
httpx==0.28.1
16+
hypothesis==6.45.0
17+
idna==3.10
18+
iniconfig==2.1.0
19+
jsonpatch==1.33
20+
jsonpointer==3.0.0
21+
langchain-core==0.3.59
22+
langgraph==0.2.23
23+
langgraph-checkpoint==1.0.12
24+
langsmith==0.3.42
25+
mock==5.2.0
26+
msgpack==1.1.0
27+
opentracing==2.4.0
28+
orjson==3.10.18
29+
packaging==24.2
30+
pluggy==1.5.0
31+
pydantic==2.11.4
32+
pydantic-core==2.33.2
33+
pytest==8.3.5
34+
pytest-asyncio==0.26.0
35+
pytest-cov==6.1.1
36+
pytest-mock==3.14.0
37+
pyyaml==6.0.2
38+
requests==2.32.3
39+
requests-toolbelt==1.0.0
40+
sniffio==1.3.1
41+
sortedcontainers==2.4.0
42+
tenacity==9.1.2
43+
typing-extensions==4.13.2
44+
typing-inspection==0.4.0
45+
urllib3==2.4.0
46+
zstandard==0.23.0

0 commit comments

Comments
 (0)