Skip to content

Commit 3bc3051

Browse files
wconti27Yun-Kim
andauthored
feat(llmobs): add Anthropic LLMObs Integration (#9462)
This PR adds LLM Observability for Anthropic messages. ## Checklist - [x] Change(s) are motivated and described in the PR description - [x] Testing strategy is described if automated tests are not included in the PR - [x] Risks are described (performance impact, potential for breakage, maintainability) - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed or label `changelog/no-changelog` is set - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)) - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) - [x] If this PR changes the public interface, I've notified `@DataDog/apm-tees`. ## Reviewer Checklist - [x] Title is accurate - [x] All changes are related to the pull request's stated goal - [x] Description motivates each change - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - [x] Testing strategy adequately addresses listed risks - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] Release note makes sense to a user of the library - [x] Author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - [x] 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) --------- Co-authored-by: Yun Kim <[email protected]> Co-authored-by: Yun Kim <[email protected]>
1 parent 52e83bf commit 3bc3051

23 files changed

+650
-148
lines changed

.riot/requirements/76db01b.txt renamed to .riot/requirements/121ef70.txt

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,45 @@
22
# This file is autogenerated by pip-compile with Python 3.11
33
# by the following command:
44
#
5-
# pip-compile --no-annotate .riot/requirements/76db01b.in
5+
# pip-compile --no-annotate .riot/requirements/121ef70.in
66
#
7-
ai21==2.4.0
7+
ai21==2.4.1
88
ai21-tokenizer==0.9.1
99
aiohttp==3.9.5
1010
aiosignal==1.3.1
1111
annotated-types==0.7.0
12+
anthropic==0.28.0
1213
anyio==4.4.0
1314
attrs==23.2.0
14-
boto3==1.34.114
15-
botocore==1.34.114
16-
certifi==2024.2.2
15+
boto3==1.34.120
16+
botocore==1.34.120
17+
certifi==2024.6.2
1718
charset-normalizer==3.3.2
18-
cohere==5.5.3
19+
cohere==5.5.4
1920
coverage[toml]==7.5.3
2021
dataclasses-json==0.6.6
22+
defusedxml==0.7.1
2123
distro==1.9.0
2224
exceptiongroup==1.2.1
2325
fastavro==1.9.4
2426
filelock==3.14.0
2527
frozenlist==1.4.1
26-
fsspec==2024.5.0
28+
fsspec==2024.6.0
2729
greenlet==3.0.3
2830
h11==0.14.0
2931
httpcore==1.0.5
3032
httpx==0.27.0
3133
httpx-sse==0.4.0
32-
huggingface-hub==0.23.2
34+
huggingface-hub==0.23.3
3335
hypothesis==6.45.0
3436
idna==3.7
3537
iniconfig==2.0.0
38+
jiter==0.4.1
3639
jmespath==1.0.1
3740
jsonpatch==1.33
3841
jsonpointer==2.4
3942
langchain==0.1.20
43+
langchain-anthropic==0.1.11
4044
langchain-aws==0.1.6
4145
langchain-community==0.0.38
4246
langchain-core==0.1.52
@@ -57,9 +61,9 @@ packaging==23.2
5761
pinecone-client==3.2.2
5862
pluggy==1.5.0
5963
psutil==5.9.8
60-
pydantic==2.7.2
61-
pydantic-core==2.18.3
62-
pytest==8.2.1
64+
pydantic==2.7.3
65+
pydantic-core==2.18.4
66+
pytest==8.2.2
6367
pytest-asyncio==0.21.1
6468
pytest-cov==5.0.0
6569
pytest-mock==3.14.0
@@ -76,10 +80,10 @@ sortedcontainers==2.4.0
7680
sqlalchemy==2.0.30
7781
tenacity==8.3.0
7882
tiktoken==0.7.0
79-
tokenizers==0.19.1
83+
tokenizers==0.15.2
8084
tqdm==4.66.4
81-
types-requests==2.32.0.20240523
82-
typing-extensions==4.12.0
85+
types-requests==2.32.0.20240602
86+
typing-extensions==4.12.1
8387
typing-inspect==0.9.0
8488
urllib3==2.2.1
8589
vcrpy==6.0.1

.riot/requirements/e17f33e.txt renamed to .riot/requirements/144795f.txt

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,65 +2,69 @@
22
# This file is autogenerated by pip-compile with Python 3.10
33
# by the following command:
44
#
5-
# pip-compile --no-annotate .riot/requirements/e17f33e.in
5+
# pip-compile --no-annotate .riot/requirements/144795f.in
66
#
7-
ai21==2.4.0
7+
ai21==2.4.1
88
ai21-tokenizer==0.9.1
99
aiohttp==3.9.5
1010
aiosignal==1.3.1
1111
annotated-types==0.7.0
12+
anthropic==0.28.0
1213
anyio==4.4.0
1314
async-timeout==4.0.3
1415
attrs==23.2.0
15-
boto3==1.34.114
16-
botocore==1.34.114
17-
certifi==2024.2.2
16+
boto3==1.34.120
17+
botocore==1.34.120
18+
certifi==2024.6.2
1819
charset-normalizer==3.3.2
19-
cohere==5.5.3
20+
cohere==5.5.4
2021
coverage[toml]==7.5.3
2122
dataclasses-json==0.6.6
23+
defusedxml==0.7.1
2224
distro==1.9.0
2325
exceptiongroup==1.2.1
2426
fastavro==1.9.4
2527
filelock==3.14.0
2628
frozenlist==1.4.1
27-
fsspec==2024.5.0
29+
fsspec==2024.6.0
2830
greenlet==3.0.3
2931
h11==0.14.0
3032
httpcore==1.0.5
3133
httpx==0.27.0
3234
httpx-sse==0.4.0
33-
huggingface-hub==0.23.2
35+
huggingface-hub==0.23.3
3436
hypothesis==6.45.0
3537
idna==3.7
3638
iniconfig==2.0.0
39+
jiter==0.4.1
3740
jmespath==1.0.1
3841
jsonpatch==1.33
3942
jsonpointer==2.4
40-
langchain==0.2.1
43+
langchain==0.2.2
44+
langchain-anthropic==0.1.15
4145
langchain-aws==0.1.6
42-
langchain-community==0.2.1
43-
langchain-core==0.2.1
44-
langchain-openai==0.1.7
46+
langchain-community==0.2.3
47+
langchain-core==0.2.4
48+
langchain-openai==0.1.8
4549
langchain-pinecone==0.1.1
46-
langchain-text-splitters==0.2.0
47-
langsmith==0.1.63
50+
langchain-text-splitters==0.2.1
51+
langsmith==0.1.73
4852
marshmallow==3.21.2
4953
mock==5.1.0
5054
multidict==6.0.5
5155
mypy-extensions==1.0.0
5256
numexpr==2.10.0
5357
numpy==1.26.4
54-
openai==1.30.4
58+
openai==1.31.1
5559
opentracing==2.4.0
5660
orjson==3.10.3
5761
packaging==23.2
5862
pinecone-client==3.2.2
5963
pluggy==1.5.0
6064
psutil==5.9.8
61-
pydantic==2.7.2
62-
pydantic-core==2.18.3
63-
pytest==8.2.1
65+
pydantic==2.7.3
66+
pydantic-core==2.18.4
67+
pytest==8.2.2
6468
pytest-asyncio==0.21.1
6569
pytest-cov==5.0.0
6670
pytest-mock==3.14.0
@@ -77,11 +81,11 @@ sortedcontainers==2.4.0
7781
sqlalchemy==2.0.30
7882
tenacity==8.3.0
7983
tiktoken==0.7.0
80-
tokenizers==0.19.1
84+
tokenizers==0.15.2
8185
tomli==2.0.1
8286
tqdm==4.66.4
83-
types-requests==2.32.0.20240523
84-
typing-extensions==4.12.0
87+
types-requests==2.32.0.20240602
88+
typing-extensions==4.12.1
8589
typing-inspect==0.9.0
8690
urllib3==2.2.1
8791
vcrpy==6.0.1

.riot/requirements/8297334.txt renamed to .riot/requirements/16311ec.txt

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,47 @@
22
# This file is autogenerated by pip-compile with Python 3.9
33
# by the following command:
44
#
5-
# pip-compile --no-annotate .riot/requirements/8297334.in
5+
# pip-compile --no-annotate .riot/requirements/16311ec.in
66
#
7-
ai21==2.4.0
7+
ai21==2.4.1
88
ai21-tokenizer==0.9.1
99
aiohttp==3.9.5
1010
aiosignal==1.3.1
1111
annotated-types==0.7.0
12+
anthropic==0.28.0
1213
anyio==4.4.0
1314
async-timeout==4.0.3
1415
attrs==23.2.0
15-
boto3==1.34.114
16-
botocore==1.34.114
17-
certifi==2024.2.2
16+
boto3==1.34.120
17+
botocore==1.34.120
18+
certifi==2024.6.2
1819
charset-normalizer==3.3.2
19-
cohere==5.5.3
20+
cohere==5.5.4
2021
coverage[toml]==7.5.3
2122
dataclasses-json==0.6.6
23+
defusedxml==0.7.1
2224
distro==1.9.0
2325
exceptiongroup==1.2.1
2426
fastavro==1.9.4
2527
filelock==3.14.0
2628
frozenlist==1.4.1
27-
fsspec==2024.5.0
29+
fsspec==2024.6.0
2830
greenlet==3.0.3
2931
h11==0.14.0
3032
httpcore==1.0.5
3133
httpx==0.27.0
3234
httpx-sse==0.4.0
33-
huggingface-hub==0.23.2
35+
huggingface-hub==0.23.3
3436
hypothesis==6.45.0
3537
idna==3.7
3638
importlib-metadata==7.1.0
3739
iniconfig==2.0.0
40+
jiter==0.4.1
3841
jmespath==1.0.1
3942
jsonpatch==1.33
4043
jsonpointer==2.4
4144
langchain==0.1.20
45+
langchain-anthropic==0.1.11
4246
langchain-aws==0.1.6
4347
langchain-community==0.0.38
4448
langchain-core==0.1.52
@@ -59,9 +63,9 @@ packaging==23.2
5963
pinecone-client==3.2.2
6064
pluggy==1.5.0
6165
psutil==5.9.8
62-
pydantic==2.7.2
63-
pydantic-core==2.18.3
64-
pytest==8.2.1
66+
pydantic==2.7.3
67+
pydantic-core==2.18.4
68+
pytest==8.2.2
6569
pytest-asyncio==0.21.1
6670
pytest-cov==5.0.0
6771
pytest-mock==3.14.0
@@ -78,15 +82,15 @@ sortedcontainers==2.4.0
7882
sqlalchemy==2.0.30
7983
tenacity==8.3.0
8084
tiktoken==0.7.0
81-
tokenizers==0.19.1
85+
tokenizers==0.15.2
8286
tomli==2.0.1
8387
tqdm==4.66.4
8488
types-requests==2.31.0.6
8589
types-urllib3==1.26.25.14
86-
typing-extensions==4.12.0
90+
typing-extensions==4.12.1
8791
typing-inspect==0.9.0
8892
urllib3==1.26.18
8993
vcrpy==6.0.1
9094
wrapt==1.16.0
9195
yarl==1.9.4
92-
zipp==3.19.0
96+
zipp==3.19.2

.riot/requirements/17e8568.txt renamed to .riot/requirements/1bd8488.txt

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,66 +2,70 @@
22
# This file is autogenerated by pip-compile with Python 3.9
33
# by the following command:
44
#
5-
# pip-compile --no-annotate .riot/requirements/17e8568.in
5+
# pip-compile --no-annotate .riot/requirements/1bd8488.in
66
#
7-
ai21==2.4.0
7+
ai21==2.4.1
88
ai21-tokenizer==0.9.1
99
aiohttp==3.9.5
1010
aiosignal==1.3.1
1111
annotated-types==0.7.0
12+
anthropic==0.28.0
1213
anyio==4.4.0
1314
async-timeout==4.0.3
1415
attrs==23.2.0
15-
boto3==1.34.114
16-
botocore==1.34.114
17-
certifi==2024.2.2
16+
boto3==1.34.120
17+
botocore==1.34.120
18+
certifi==2024.6.2
1819
charset-normalizer==3.3.2
19-
cohere==5.5.3
20+
cohere==5.5.4
2021
coverage[toml]==7.5.3
2122
dataclasses-json==0.6.6
23+
defusedxml==0.7.1
2224
distro==1.9.0
2325
exceptiongroup==1.2.1
2426
fastavro==1.9.4
2527
filelock==3.14.0
2628
frozenlist==1.4.1
27-
fsspec==2024.5.0
29+
fsspec==2024.6.0
2830
greenlet==3.0.3
2931
h11==0.14.0
3032
httpcore==1.0.5
3133
httpx==0.27.0
3234
httpx-sse==0.4.0
33-
huggingface-hub==0.23.2
35+
huggingface-hub==0.23.3
3436
hypothesis==6.45.0
3537
idna==3.7
3638
importlib-metadata==7.1.0
3739
iniconfig==2.0.0
40+
jiter==0.4.1
3841
jmespath==1.0.1
3942
jsonpatch==1.33
4043
jsonpointer==2.4
41-
langchain==0.2.1
44+
langchain==0.2.2
45+
langchain-anthropic==0.1.15
4246
langchain-aws==0.1.6
43-
langchain-community==0.2.1
44-
langchain-core==0.2.1
45-
langchain-openai==0.1.7
47+
langchain-community==0.2.3
48+
langchain-core==0.2.4
49+
langchain-openai==0.1.8
4650
langchain-pinecone==0.1.1
47-
langchain-text-splitters==0.2.0
48-
langsmith==0.1.63
51+
langchain-text-splitters==0.2.1
52+
langsmith==0.1.73
4953
marshmallow==3.21.2
5054
mock==5.1.0
5155
multidict==6.0.5
5256
mypy-extensions==1.0.0
5357
numexpr==2.10.0
5458
numpy==1.26.4
55-
openai==1.30.4
59+
openai==1.31.1
5660
opentracing==2.4.0
5761
orjson==3.10.3
5862
packaging==23.2
5963
pinecone-client==3.2.2
6064
pluggy==1.5.0
6165
psutil==5.9.8
62-
pydantic==2.7.2
63-
pydantic-core==2.18.3
64-
pytest==8.2.1
66+
pydantic==2.7.3
67+
pydantic-core==2.18.4
68+
pytest==8.2.2
6569
pytest-asyncio==0.21.1
6670
pytest-cov==5.0.0
6771
pytest-mock==3.14.0
@@ -78,15 +82,15 @@ sortedcontainers==2.4.0
7882
sqlalchemy==2.0.30
7983
tenacity==8.3.0
8084
tiktoken==0.7.0
81-
tokenizers==0.19.1
85+
tokenizers==0.15.2
8286
tomli==2.0.1
8387
tqdm==4.66.4
8488
types-requests==2.31.0.6
8589
types-urllib3==1.26.25.14
86-
typing-extensions==4.12.0
90+
typing-extensions==4.12.1
8791
typing-inspect==0.9.0
8892
urllib3==1.26.18
8993
vcrpy==6.0.1
9094
wrapt==1.16.0
9195
yarl==1.9.4
92-
zipp==3.19.0
96+
zipp==3.19.2

0 commit comments

Comments
 (0)