Skip to content

feat(langchain): update integration to from ai.* to gen_ai.* span attributes #4678

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

Merged
merged 52 commits into from
Aug 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
fb1bc57
feat(langchain): update integration to use gen_ai.* instead of ai.*
shellmayr Aug 6, 2025
c28f636
add metadata span attribute
shellmayr Aug 6, 2025
835bf8c
somehow fix unrelated type?
shellmayr Aug 6, 2025
2f62e58
update completions op
shellmayr Aug 7, 2025
baa8a99
fix test
shellmayr Aug 7, 2025
f0fb4e3
port some more attributes
shellmayr Aug 7, 2025
4f140e2
add tool name
shellmayr Aug 7, 2025
9669277
nicer traces
shellmayr Aug 11, 2025
1b6ed45
add data for tokens from langchain
shellmayr Aug 11, 2025
0fbdb10
remove gen_ai.run & gen_ai.pipeline
shellmayr Aug 12, 2025
52a1237
remove logs
shellmayr Aug 12, 2025
426a0fd
remove logs
shellmayr Aug 12, 2025
01a30c1
remove logs
shellmayr Aug 12, 2025
2acd8fe
add token extraction for streams & openai
shellmayr Aug 13, 2025
e39c241
add type ignore back in
shellmayr Aug 13, 2025
b0a2c7c
fix and adapt tests for token extraction
shellmayr Aug 13, 2025
dd166a8
updated tool span
antonpirker Aug 13, 2025
adaabbf
.
antonpirker Aug 13, 2025
6c0d172
updated tool span (#4695)
antonpirker Aug 13, 2025
3795d63
tool name
antonpirker Aug 13, 2025
eb95293
chat span
antonpirker Aug 13, 2025
c8c9c66
Merge branch 'master' into shellmayr/feat/langchain-integration-update
antonpirker Aug 13, 2025
8b4719b
Merge branch 'shellmayr/feat/langchain-integration-update' into anton…
antonpirker Aug 13, 2025
9b09474
fix available tools
antonpirker Aug 13, 2025
1645c07
wrap agent executor
shellmayr Aug 13, 2025
94fd28f
cleanup
antonpirker Aug 13, 2025
1fbdabe
work on chat span (#4696)
antonpirker Aug 13, 2025
0bea3de
Merge branch 'shellmayr/feat/langchain-integration-update' into anton…
antonpirker Aug 13, 2025
ae5b3f2
handle data fields the same everywhere
antonpirker Aug 13, 2025
485ae4d
More data on chat span
antonpirker Aug 13, 2025
2deb597
gen_ai system
antonpirker Aug 13, 2025
58d79f7
Cleanup
antonpirker Aug 13, 2025
0574d6c
whitespace
antonpirker Aug 13, 2025
a39307a
nicer empty tool calls
antonpirker Aug 13, 2025
9a68a32
nesting streaming agent correctly
antonpirker Aug 14, 2025
7a4cd05
agent name
antonpirker Aug 14, 2025
6cf6f9d
some agent input/output attributes
antonpirker Aug 14, 2025
3d89081
agent name
antonpirker Aug 14, 2025
fad4e06
agent span
antonpirker Aug 14, 2025
b8a080a
cleanup
antonpirker Aug 14, 2025
595f5e3
cleanup
antonpirker Aug 14, 2025
8fe8e49
cleanup
antonpirker Aug 14, 2025
1cec53f
cleanup
antonpirker Aug 14, 2025
789f6b3
cleanup
antonpirker Aug 14, 2025
8ac5e33
Refactored token usage
antonpirker Aug 14, 2025
4cbd78a
Merge branch 'master' into shellmayr/feat/langchain-integration-update
antonpirker Aug 14, 2025
503290f
cleanup
antonpirker Aug 14, 2025
6c9e08f
cleanup
antonpirker Aug 14, 2025
5f35835
xfail
antonpirker Aug 14, 2025
52119d0
mypy
antonpirker Aug 14, 2025
262f7be
fixes
antonpirker Aug 14, 2025
08e24a6
fixes
antonpirker Aug 14, 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
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ ignore_missing_imports = true
module = "langchain_core.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "langchain.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "executing.*"
ignore_missing_imports = true
Expand Down
6 changes: 1 addition & 5 deletions sentry_sdk/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,7 @@ class OP:
GEN_AI_EMBEDDINGS = "gen_ai.embeddings"
GEN_AI_EXECUTE_TOOL = "gen_ai.execute_tool"
GEN_AI_HANDOFF = "gen_ai.handoff"
GEN_AI_PIPELINE = "gen_ai.pipeline"
GEN_AI_INVOKE_AGENT = "gen_ai.invoke_agent"
GEN_AI_RESPONSES = "gen_ai.responses"
GRAPHQL_EXECUTE = "graphql.execute"
Expand Down Expand Up @@ -822,11 +823,6 @@ class OP:
HUGGINGFACE_HUB_CHAT_COMPLETIONS_CREATE = (
"ai.chat_completions.create.huggingface_hub"
)
LANGCHAIN_PIPELINE = "ai.pipeline.langchain"
LANGCHAIN_RUN = "ai.run.langchain"
LANGCHAIN_TOOL = "ai.tool.langchain"
LANGCHAIN_AGENT = "ai.agent.langchain"
LANGCHAIN_CHAT_COMPLETIONS_CREATE = "ai.chat_completions.create.langchain"
QUEUE_PROCESS = "queue.process"
QUEUE_PUBLISH = "queue.publish"
QUEUE_SUBMIT_ARQ = "queue.submit.arq"
Expand Down
Loading