Skip to content

feat(langgraph): Support span streaming - #6406

Merged
alexander-alderman-webb merged 17 commits into
masterfrom
webb/langgraph/span-first
May 27, 2026
Merged

feat(langgraph): Support span streaming#6406
alexander-alderman-webb merged 17 commits into
masterfrom
webb/langgraph/span-first

Conversation

@alexander-alderman-webb

@alexander-alderman-webbalexander-alderman-webb commented May 26, 2026

Copy link
Copy Markdown
Contributor

Note: Depends on #6405

Description

Use sentry_sdk.traces.start_span and replace Span.set_data() with StreamedSpan.set_attribute() when in span streaming mode.

Do not create spans for StateGraph.compile when the streaming trace lifecycle is configured.

Parametrize tests on the trace lifecycle option.

Issues

Closes#6032

Reminders

@github-actions

github-actionsBot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

282 passed | Total: 282 | Pass Rate: 100% | Execution Time: 44.41s

All tests are passing successfully.

❌ Patch coverage is 0.00%. Project has 14861 uncovered lines.

Files with missing lines (1)
FilePatch %Lines
sentry_sdk/integrations/langgraph.py0.00%⚠️ 23 Missing

Generated by Codecov Action

@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review May 26, 2026 12:25
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code ownerMay 26, 2026 12:25
Comment threadsentry_sdk/integrations/langgraph.py
Comment threadsentry_sdk/integrations/langgraph.py
Comment threadsentry_sdk/integrations/langgraph.py
Base automatically changed from webb/langchain/span-first to masterMay 27, 2026 11:31

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 41ed46b. Configure here.

Comment threadtests/integrations/langgraph/test_langgraph.py
@alexander-alderman-webb
alexander-alderman-webb merged commit 059c68e into masterMay 27, 2026
163 of 167 checks passed
@alexander-alderman-webb
alexander-alderman-webb deleted the webb/langgraph/span-first branch May 27, 2026 12:22
mgaligniana pushed a commit to mgaligniana/sentry-python that referenced this pull request Aug 9, 2026
Do not create spans for `StateGraph.compile()` when the streaming trace lifecycle is selected.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate langgraph to span first

2 participants

@alexander-alderman-webb@sentrivana