Skip to content

test(e2e): Add node-flue-send-to-sentry test app - #25550

Open
RulaKhaled wants to merge 3 commits into
fix/flue-node-agent-tracefrom
test/node-flue-send-to-sentry-e2e
Open

RulaKhaled wants to merge 3 commits into
fix/flue-node-agent-tracefrom
test/node-flue-send-to-sentry-e2e

Conversation

@RulaKhaled

Copy link
Copy Markdown
Collaborator

An e2e app that uses the Flue integration the way a user does and sends the data to a real Sentry project, per #24753. Cloudflare already has one (cloudflare-flue-send-to-sentry, #24816), so this covers Node.

Stacked on #25549. Without that fix every turn after the first lands in the first request's trace, which these tests catch. This PR targets its branch and retargets to develop once it merges.

The app. A built Flue server, with Sentry.init imported first and @sentry/node/import preloaded, runs real tool-calling turns through OpenRouter. The router answers 202 before a turn runs, so the tests find each trace by the gen_ai.conversation.id Flue reports back, as the Cloudflare app does. @flue/runtime is pinned to 2.0.5 like node-flue, with a (latest) variant.

node-flue now checks that each turn sits under the request that sent it. Its weather tool also reads ({ data }), the way Flue 2 passes tool input, so it stops answering "sunny in undefined".

Closes #24753

🤖 Generated with Claude Code

RulaKhaled and others added 2 commits October 20, 2026 13:57
A Flue app on Node that runs real OpenRouter turns and reads the gen_ai
spans back from a real Sentry project, with a `latest` variant. Also
checks in `node-flue` that each turn sits under the request that sent it,
and fixes its weather tool to read `({ data })`, the way Flue 2 passes
tool input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry apps

Use the conventions search aliases and op constants, assert token usage,
cost and the tool's arguments and result rather than presence alone, check
that every chat span sits under the agent span, put the parent
relationships into the wait conditions so the checks cannot run before the
spans land, give the polls a 400s timeout, and report the response body
when a turn is not admitted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RulaKhaled
RulaKhaled force-pushed the test/node-flue-send-to-sentry-e2e branch from 357d873 to c062e1f Compare October 20, 2026 11:57
@RulaKhaled

Copy link
Copy Markdown
Collaborator Author

bugbot run

@cursor cursor Bot 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.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c062e1f. Configure here.

…span tests

The model chooses the `get_weather` argument and may send `Berlin, Germany`
as well as `Berlin`, so match on the city name rather than the exact
string, as the Paris check already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RulaKhaled
RulaKhaled marked this pull request as ready for review October 20, 2026 12:36

This branch has not been deployed

No deployments
Sign up for free to 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.

Add realistic e2e test app for Flue

1 participant