Skip to content

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

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

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

Conversation

@RulaKhaled

@RulaKhaled RulaKhaled commented Oct 20, 2026 •

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. hello.ts is a 'use agent' module, so @flue/vite binds its identity at build time, which the integration suite cannot reproduce.

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

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.

@RulaKhaled
RulaKhaled marked this pull request as ready for review October 20, 2026 12:36

@nicohrubec nicohrubec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

might be worth doing one more agent round run to cut down the commentary a bit in a few places but else lgtm

@@ -0,0 +1,110 @@
import { expect, test } from '@playwright/test';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

l: the filename flue.test.ts doesn't really tell me what I'll find in here. I'd suggest renaming to tracing.test.ts or spans.test.ts for instance?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

i'd keep it, this is consistent with other e2e apps (it has spans, errors, dataloader, ..etc)

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: d24537c (PR test merge using develop at 78d0c90)

Against: ad71ef6 (develop) · base run #63604

⚠️ Baseline mismatch: 3 develop commit(s) in the PR build are missing from the baseline. Their size changes also affect this comparison. Compare commits. Re-run once develop's baseline build for 78d0c90 finishes.

Path Size % Change Change
@sentry/browser 29.98 kB - -
@sentry/browser - with treeshaking flags 28.13 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.03 kB - -
@sentry/browser (incl. Tracing) 52.17 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.18 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.12 kB - -
@sentry/browser (incl. Tracing, Replay) 91.97 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 80.86 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 96.7 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 109.64 kB - -
@sentry/browser (incl. Feedback) 47.51 kB - -
@sentry/browser (incl. sendFeedback) 35.05 kB - -
@sentry/browser (incl. FeedbackAsync) 40.15 kB - -
@sentry/browser (incl. Metrics) 31.01 kB - -
@sentry/browser (incl. Logs) 31.28 kB - -
@sentry/browser (incl. Metrics & Logs) 31.94 kB - -
@sentry/react 31.81 kB - -
@sentry/react (incl. Tracing) 54.5 kB - -
@sentry/vue 38.14 kB - -
@sentry/vue (incl. Tracing) 55.11 kB - -
@sentry/svelte 30.01 kB - -
@sentry/remix (Remix 3 client bundle) 57.19 kB - -
CDN Bundle 31.76 kB - -
CDN Bundle (incl. Tracing) 52.71 kB - -
CDN Bundle (incl. Logs, Metrics) 33.95 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 54.66 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.93 kB - -
CDN Bundle (incl. Tracing, Replay) 90.41 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 92.33 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.55 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.5 kB - -
CDN Bundle - uncompressed 93.51 kB - -
CDN Bundle (incl. Tracing) - uncompressed 156.36 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.06 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 162.33 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 230.28 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 276.71 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 282.66 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 290.41 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 296.35 kB - -
@sentry/nextjs (client) 57.38 kB - -
@sentry/sveltekit (client) 52.55 kB - -
@sentry/core/server 43.62 kB - -
@sentry/core/browser 13.81 kB - -
@sentry/node 153.94 kB +0.01% +2 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.58 kB - -
@sentry/node - without tracing 95.48 kB +0.01% +1 B 🔺
@sentry/node - without channel injection 134.59 kB +0.01% +1 B 🔺
@sentry/aws-serverless 103.61 kB -0.01% -1 B 🔽
@sentry/cloudflare (withSentry) - minified 196.92 kB - -
@sentry/cloudflare (withSentry) 489.4 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 217.51 kB - -

View base workflow run

RulaKhaled and others added 4 commits October 26, 2026 19:31
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>
…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>
Keep only the reason for each comment, and drop the `'use agent'`
explanation from the agent module, as asked in review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RulaKhaled
RulaKhaled force-pushed the test/node-flue-send-to-sentry-e2e branch from 76bea67 to 216e054 Compare October 26, 2026 18:32
@github-actions

Copy link
Copy Markdown
Contributor

Optional E2E tests

All optional checks were successful. 4 successful. See the run.

Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E node-flue (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-flue-send-to-sentry (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-flue Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-flue-send-to-sentry Test (optional) Successful in 5m Details

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

2 participants