Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ed4d833
feat: add langgraph integration
shellmayr Aug 26, 2025
4b3b664
use the correct span ops / data names
shellmayr Aug 26, 2025
e5d2520
add create agent and make instrumentation more semantically meaningful
shellmayr Aug 28, 2025
b2ec8c2
attach tools to agent creation
shellmayr Aug 28, 2025
e65168d
remove unused code
shellmayr Aug 28, 2025
e9e53c3
add some more data
shellmayr Aug 28, 2025
aec2e26
cleanup
shellmayr Aug 28, 2025
ba7e4a0
handle messages better
shellmayr Aug 29, 2025
c7e326d
simplify
shellmayr Sep 1, 2025
affa2f9
simplify & add tests
shellmayr Sep 1, 2025
0de085a
remove comment
shellmayr Sep 1, 2025
71af1cc
Added langgraph to test matrix
antonpirker Sep 2, 2025
f013b48
more test setup
antonpirker Sep 2, 2025
1140d93
add correct response output
shellmayr Sep 3, 2025
b5c6e37
fix tests
shellmayr Sep 3, 2025
8be760f
fix tox
shellmayr Sep 3, 2025
fa7aba3
remove non-end-to-end tests
shellmayr Sep 3, 2025
573b989
Merge branch 'master' into shellmayr/feat/langgraph-integration
antonpirker Sep 3, 2025
7270228
code formatting
antonpirker Sep 3, 2025
f822271
cleanup
antonpirker Sep 3, 2025
3de395a
updated test mastrix
antonpirker Sep 3, 2025
5df87e0
ignore missing imports for langgraph in mypy
antonpirker Sep 3, 2025
6966b82
typing
antonpirker Sep 3, 2025
fcdba78
remove wrapped dunder field
shellmayr Sep 3, 2025
58ac37c
address review comments
shellmayr Sep 4, 2025
95cf995
remove streaming attribute check in tests
shellmayr Sep 4, 2025
d400545
remove first naming
shellmayr Sep 4, 2025
b544b05
properly set descriptions and fix tests
shellmayr Sep 4, 2025
67b7000
remove debug comment
shellmayr Sep 4, 2025
b363f20
remove pdb
shellmayr Sep 4, 2025
2f311a8
only serialize once
shellmayr Sep 4, 2025
c1096db
consistent span naming
shellmayr Sep 4, 2025
a2c7014
losen up code a bit
antonpirker Sep 4, 2025
db1fb16
losen up code a bit
antonpirker Sep 4, 2025
0500b81
nit
antonpirker Sep 4, 2025
72d384a
Merge branch 'master' into shellmayr/feat/langgraph-integration
antonpirker Sep 4, 2025
2891402
only setting description is fine
antonpirker Sep 4, 2025
ff575b2
auto enable
antonpirker Sep 4, 2025
36f7e41
add tests for response and tool use extraction and remove comments
shellmayr Sep 4, 2025
08fb67d
removed obsolete test
antonpirker Sep 4, 2025
f903562
Merge branch 'shellmayr/feat/langgraph-integration' of github.com:get…
antonpirker Sep 4, 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
89 changes: 89 additions & 0 deletions .github/workflows/test-integrations-ai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,89 @@ env:
CACHED_BUILD_PATHS: |
${{ github.workspace }}/dist-serverless
jobs:
test-ai-latest:
name: AI (latest)
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9","3.11","3.12"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-22.04]
# Use Docker container only for Python 3.6
container: ${{ matrix.python-version == '3.6' && 'python:3.6' || null }}
steps:
- uses: actions/[email protected]
- uses: actions/setup-python@v5
if: ${{ matrix.python-version != '3.6' }}
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Setup Test Env
run: |
pip install "coverage[toml]" tox
- name: Erase coverage
run: |
coverage erase
- name: Test anthropic latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-anthropic-latest"
- name: Test cohere latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-cohere-latest"
- name: Test langchain latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-latest"
- name: Test langgraph latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-langgraph-latest"
- name: Test openai latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-openai-latest"
- name: Test openai_agents latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-openai_agents-latest"
- name: Test huggingface_hub latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-huggingface_hub-latest"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
# make sure no plugins alter our coverage reports
plugins: noop
verbose: true
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: .junitxml
verbose: true
test-ai-pinned:
name: AI (pinned)
timeout-minutes: 30
Expand Down Expand Up @@ -63,6 +146,12 @@ jobs:
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-langchain-base"
- name: Test langchain-notiktoken pinned
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-langchain"
- name: Test langgraph pinned
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-langgraph"
- name: Test openai pinned
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-langchain-notiktoken"
Expand Down
3 changes: 3 additions & 0 deletions scripts/populate_tox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@
},
"include": "<1.0",
},
"langgraph": {
"package": "langgraph",
},
"launchdarkly": {
"package": "launchdarkly-server-sdk",
},
Expand Down
2 changes: 2 additions & 0 deletions scripts/populate_tox/tox.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ setenv =
huggingface_hub: TESTPATH=tests/integrations/huggingface_hub
langchain-base: TESTPATH=tests/integrations/langchain
langchain-notiktoken: TESTPATH=tests/integrations/langchain
langchain: TESTPATH=tests/integrations/langchain
langgraph: TESTPATH=tests/integrations/langgraph
launchdarkly: TESTPATH=tests/integrations/launchdarkly
litestar: TESTPATH=tests/integrations/litestar
loguru: TESTPATH=tests/integrations/loguru
Expand Down
2 changes: 2 additions & 0 deletions scripts/split_tox_gh_actions/split_tox_gh_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
"langchain-notiktoken",
"openai-base",
"openai-notiktoken",
"langchain",
"langgraph",
"openai_agents",
"huggingface_hub",
],
Expand Down
1 change: 1 addition & 0 deletions sentry_sdk/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ class OP:
FUNCTION_AWS = "function.aws"
FUNCTION_GCP = "function.gcp"
GEN_AI_CHAT = "gen_ai.chat"
GEN_AI_CREATE_AGENT = "gen_ai.create_agent"
GEN_AI_EMBEDDINGS = "gen_ai.embeddings"
GEN_AI_EXECUTE_TOOL = "gen_ai.execute_tool"
GEN_AI_HANDOFF = "gen_ai.handoff"
Expand Down
3 changes: 2 additions & 1 deletion sentry_sdk/integrations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def iter_default_integrations(with_auto_enabling_integrations):
"graphene": (3, 3),
"grpc": (1, 32, 0), # grpcio
"huggingface_hub": (0, 22),
"langchain": (0, 1, 0),
"langchain": (0, 0, 210),
"langgraph": (0, 6, 6),
"launchdarkly": (9, 8, 0),
"loguru": (0, 7, 0),
"openai": (1, 0, 0),
Expand Down
Loading
Loading