Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(langgraph): submit spans from langgraph to APM and LLMObs #11730

Merged
merged 44 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7c5cdac
init
sabrenner Dec 12, 2024
d00517d
wip
sabrenner Dec 13, 2024
24a9a13
Merge branch 'main' of github.com:DataDog/dd-trace-py into sabrenner/…
sabrenner Dec 13, 2024
263ab81
wip
sabrenner Dec 13, 2024
529502b
move node invokes logic to integration
sabrenner Dec 16, 2024
0be2c82
just handle default span links in langgraph integration for now
sabrenner Dec 16, 2024
f195f6e
input to input linkage
sabrenner Dec 17, 2024
b94a84f
more possible but brittle linking logic
sabrenner Dec 17, 2024
3d545e2
addressing some feedback
sabrenner Dec 17, 2024
6b4b67b
Merge branch 'main' of github.com:DataDog/dd-trace-py into sabrenner/…
sabrenner Dec 17, 2024
e9b43bc
clean up graph, subgraph as a node, and subgraph invoked from node logic
sabrenner Dec 18, 2024
120651c
Refactor for readability, move _node_invokes to integration level
Yun-Kim Dec 20, 2024
757d1d8
Add node dict clearing logic after full graph execution
Yun-Kim Dec 23, 2024
cd5b393
Add async patching, basic patch tests
Yun-Kim Dec 23, 2024
82d879e
Add tests
Yun-Kim Dec 27, 2024
c5d04bf
Add lockfiles, fmt, add suitespec
Yun-Kim Dec 27, 2024
1701b91
Release note
Yun-Kim Dec 27, 2024
bb45036
Docs, remove unnecessary config
Yun-Kim Dec 27, 2024
6385b44
Docs
Yun-Kim Dec 27, 2024
c36ac96
Merge branch 'main' into sabrenner/langgraph
Yun-Kim Dec 27, 2024
280c033
fmt
Yun-Kim Dec 30, 2024
d9c8966
Make span sample rate optional config for init
Yun-Kim Dec 31, 2024
921c0cd
add simple stream patching
sabrenner Jan 3, 2025
81ad3a6
update apm tests to cover all functions
sabrenner Jan 3, 2025
faed9d6
fix rel note and add some llmobs output testing
sabrenner Jan 3, 2025
41d1a6c
fmt
sabrenner Jan 3, 2025
859c966
change to __anext__
sabrenner Jan 7, 2025
4e077ab
Merge branch 'main' into sabrenner/langgraph
sabrenner Jan 7, 2025
22c7d9d
Merge branch 'main' into sabrenner/langgraph
sabrenner Jan 9, 2025
4c63c72
Add lockfile for 3.13
Yun-Kim Jan 9, 2025
74a2e87
Override base patch test due to langgraph import structure
Yun-Kim Jan 9, 2025
ed37f93
Merge branch 'main' of github.com:DataDog/dd-trace-py into sabrenner/…
sabrenner Jan 9, 2025
ff45cef
add span event changes to _llmobs
sabrenner Jan 9, 2025
f1ac1ec
fix llmobs tests
sabrenner Jan 9, 2025
68abdf3
only enabled by explicit env var
sabrenner Jan 9, 2025
cc31619
fix rel note
sabrenner Jan 9, 2025
63f7255
try enabling testagent
sabrenner Jan 10, 2025
0370e96
some review comments
sabrenner Jan 13, 2025
ec996b0
add patching gate via private envvar
sabrenner Jan 14, 2025
d6e5e8e
remove rel note
sabrenner Jan 14, 2025
79e78f8
put env var setting in-code for tests
sabrenner Jan 14, 2025
2621dc1
remove more docs
sabrenner Jan 14, 2025
ebc7128
comments
sabrenner Jan 16, 2025
1a2dab7
Merge branch 'main' into sabrenner/langgraph
sabrenner Jan 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ ddtrace/contrib/internal/google_generativeai @DataDog/ml-observabilit
ddtrace/contrib/google_generativeai @DataDog/ml-observability
ddtrace/contrib/internal/vertexai @DataDog/ml-observability
ddtrace/contrib/vertexai @DataDog/ml-observability
ddtrace/contrib/langgraph @DataDog/ml-observability
ddtrace/contrib/internal/langgraph @DataDog/ml-observability
tests/llmobs @DataDog/ml-observability
tests/contrib/openai @DataDog/ml-observability
tests/contrib/langchain @DataDog/ml-observability
Expand All @@ -156,6 +158,7 @@ tests/contrib/botocore/bedrock_cassettes @DataDog/ml-observabilit
tests/contrib/anthropic @DataDog/ml-observability
tests/contrib/google_generativeai @DataDog/ml-observability
tests/contrib/vertexai @DataDog/ml-observability
tests/contrib/langgraph @DataDog/ml-observability
.gitlab/tests/llmobs.yml @DataDog/ml-observability

# Remote Config
Expand Down
42 changes: 42 additions & 0 deletions .riot/requirements/115283d.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --allow-unsafe --no-annotate .riot/requirements/115283d.in
#
anyio==4.7.0
attrs==24.3.0
certifi==2024.12.14
charset-normalizer==3.4.1
coverage[toml]==7.6.10
h11==0.14.0
httpcore==1.0.7
httpx==0.28.1
hypothesis==6.45.0
idna==3.10
iniconfig==2.0.0
jsonpatch==1.33
jsonpointer==3.0.0
langchain-core==0.3.28
langgraph==0.2.60
langgraph-checkpoint==2.0.9
langgraph-sdk==0.1.48
langsmith==0.2.6
mock==5.1.0
msgpack==1.1.0
opentracing==2.4.0
orjson==3.10.12
packaging==24.2
pluggy==1.5.0
pytest==8.3.4
pytest-asyncio==0.25.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pyyaml==6.0.2
requests==2.32.3
requests-toolbelt==1.0.0
sniffio==1.3.1
sortedcontainers==2.4.0
tenacity==9.0.0
typing-extensions==4.12.2
urllib3==2.3.0
45 changes: 45 additions & 0 deletions .riot/requirements/18551a1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# This file is autogenerated by pip-compile with Python 3.13
# by the following command:
#
# pip-compile --allow-unsafe --no-annotate .riot/requirements/18551a1.in
#
annotated-types==0.7.0
anyio==4.8.0
attrs==24.3.0
certifi==2024.12.14
charset-normalizer==3.4.1
coverage[toml]==7.6.10
h11==0.14.0
httpcore==1.0.7
httpx==0.28.1
hypothesis==6.45.0
idna==3.10
iniconfig==2.0.0
jsonpatch==1.33
jsonpointer==3.0.0
langchain-core==0.3.29
langgraph==0.2.61
langgraph-checkpoint==2.0.9
langgraph-sdk==0.1.48
langsmith==0.2.10
mock==5.1.0
msgpack==1.1.0
opentracing==2.4.0
orjson==3.10.14
packaging==24.2
pluggy==1.5.0
pydantic==2.10.5
pydantic-core==2.27.2
pytest==8.3.4
pytest-asyncio==0.25.2
pytest-cov==6.0.0
pytest-mock==3.14.0
pyyaml==6.0.2
requests==2.32.3
requests-toolbelt==1.0.0
sniffio==1.3.1
sortedcontainers==2.4.0
tenacity==9.0.0
typing-extensions==4.12.2
urllib3==2.3.0
45 changes: 45 additions & 0 deletions .riot/requirements/2bd0151.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --allow-unsafe --no-annotate --resolver=backtracking .riot/requirements/2bd0151.in
#
annotated-types==0.7.0
anyio==4.7.0
attrs==24.3.0
certifi==2024.12.14
charset-normalizer==3.4.0
coverage[toml]==7.6.9
h11==0.14.0
httpcore==1.0.7
httpx==0.28.1
hypothesis==6.45.0
idna==3.10
iniconfig==2.0.0
jsonpatch==1.33
jsonpointer==3.0.0
langchain-core==0.3.28
langgraph==0.2.60
langgraph-checkpoint==2.0.9
langgraph-sdk==0.1.48
langsmith==0.2.4
mock==5.1.0
msgpack==1.1.0
opentracing==2.4.0
orjson==3.10.12
packaging==24.2
pluggy==1.5.0
pydantic==2.10.4
pydantic-core==2.27.2
pytest==8.3.4
pytest-asyncio==0.25.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pyyaml==6.0.2
requests==2.32.3
requests-toolbelt==1.0.0
sniffio==1.3.1
sortedcontainers==2.4.0
tenacity==9.0.0
typing-extensions==4.12.2
urllib3==2.3.0
47 changes: 47 additions & 0 deletions .riot/requirements/2e4fbd3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile --allow-unsafe --no-annotate --resolver=backtracking .riot/requirements/2e4fbd3.in
#
annotated-types==0.7.0
anyio==4.7.0
attrs==24.3.0
certifi==2024.12.14
charset-normalizer==3.4.1
coverage[toml]==7.6.10
exceptiongroup==1.2.2
h11==0.14.0
httpcore==1.0.7
httpx==0.28.1
hypothesis==6.45.0
idna==3.10
iniconfig==2.0.0
jsonpatch==1.33
jsonpointer==3.0.0
langchain-core==0.3.28
langgraph==0.2.60
langgraph-checkpoint==2.0.9
langgraph-sdk==0.1.48
langsmith==0.2.6
mock==5.1.0
msgpack==1.1.0
opentracing==2.4.0
orjson==3.10.12
packaging==24.2
pluggy==1.5.0
pydantic==2.10.4
pydantic-core==2.27.2
pytest==8.3.4
pytest-asyncio==0.25.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pyyaml==6.0.2
requests==2.32.3
requests-toolbelt==1.0.0
sniffio==1.3.1
sortedcontainers==2.4.0
tenacity==9.0.0
tomli==2.2.1
typing-extensions==4.12.2
urllib3==2.3.0
47 changes: 47 additions & 0 deletions .riot/requirements/7dd4bcd.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --no-annotate .riot/requirements/7dd4bcd.in
#
annotated-types==0.7.0
anyio==4.7.0
attrs==24.3.0
certifi==2024.12.14
charset-normalizer==3.4.1
coverage[toml]==7.6.10
exceptiongroup==1.2.2
h11==0.14.0
httpcore==1.0.7
httpx==0.28.1
hypothesis==6.45.0
idna==3.10
iniconfig==2.0.0
jsonpatch==1.33
jsonpointer==3.0.0
langchain-core==0.3.28
langgraph==0.2.60
langgraph-checkpoint==2.0.9
langgraph-sdk==0.1.48
langsmith==0.2.6
mock==5.1.0
msgpack==1.1.0
opentracing==2.4.0
orjson==3.10.12
packaging==24.2
pluggy==1.5.0
pydantic==2.10.4
pydantic-core==2.27.2
pytest==8.3.4
pytest-asyncio==0.25.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pyyaml==6.0.2
requests==2.32.3
requests-toolbelt==1.0.0
sniffio==1.3.1
sortedcontainers==2.4.0
tenacity==9.0.0
tomli==2.2.1
typing-extensions==4.12.2
urllib3==2.3.0
5 changes: 5 additions & 0 deletions ddtrace/_monkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"grpc": True,
"httpx": True,
"kafka": True,
"langgraph": False,
Yun-Kim marked this conversation as resolved.
Show resolved Hide resolved
"mongoengine": True,
"mysql": True,
"mysqldb": True,
Expand Down Expand Up @@ -148,6 +149,10 @@
"httplib": ("http.client",),
"kafka": ("confluent_kafka",),
"google_generativeai": ("google.generativeai",),
"langgraph": (
"langgraph",
"langgraph.graph",
),
}


Expand Down
Loading
Loading