Skip to content

test(e2e): Add E2E test app for orchestrion instrumentations on Remix#22218

Merged
andreiborza merged 3 commits into
developfrom
ab/remix-orchestrion-e2e
Jul 14, 2026
Merged

test(e2e): Add E2E test app for orchestrion instrumentations on Remix#22218
andreiborza merged 3 commits into
developfrom
ab/remix-orchestrion-e2e

Conversation

@andreiborza

@andreiborza andreiborza commented Jul 13, 2026

Copy link
Copy Markdown
Member

What

Adds a Remix (v2, Vite) E2E test app that exercises orchestrion-based auto-instrumentation for mysql and ioredis.

  • vite.config.ts wires sentryRemixVitePlugin() + sentryOrchestrionPlugin() to inject diagnostics_channel calls into the bundled DB drivers at build time.
  • instrument.server.cjs opts in via experimentalUseDiagnosticsChannelInjection() before Sentry.init(), loaded through --require.
  • Page routes /db-mysql and /db-ioredis run each driver in a loader; tests/db.test.ts asserts the auto.db.orchestrion.{mysql,redis} spans.
  • docker-compose.yml + global setup/teardown boot MySQL 8 and Redis 7 outside the Playwright startup window.

Why

Extends the orchestrion E2E coverage (already landed for Next.js, TanStack Start, React Router, SvelteKit, Nuxt, Astro) to Remix.

Closes: #21998

@andreiborza andreiborza marked this pull request as ready for review July 13, 2026 12:49
Comment on lines +9 to +15
return new Promise<{ status: string }>(resolve => {
connection.query('SELECT 1 + 1 AS solution', () => {
connection.query('SELECT NOW()', ['1', '2'], () => {
resolve({ status: 'ok' });
});
});
});

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.

You might also need a finally block here (like in redis) with connection.end() so this is properly closed. Not sure if you run into issues when running this test locally.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added in 07f5c89

// Runs the orchestrion code transform over the SSR server bundle and
// force-bundles the instrumented deps (mysql, ioredis, …) so the
// diagnostics-channel calls are actually injected at build time.
sentryOrchestrionPlugin(),

@s1gr1d s1gr1d Jul 13, 2026

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.

Did you also double-check that the tracing channels are included in the build? I made the experience that tests run successfully with just experimentalUseDiagnosticsChannelInjection, but this would not add the channels.

@andreiborza andreiborza Jul 13, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No I didn't check this, thanks for pointing that out! I added a test that asserts this based on the built bundle.

Added in 07f5c89

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.

Oh nice! I only checked this manually so far for the tests I added BUT this is is a good idea - it's pretty easy to check this.

@andreiborza andreiborza requested a review from s1gr1d July 13, 2026 14:53
@andreiborza andreiborza merged commit 2623517 into develop Jul 14, 2026
606 of 608 checks passed
@andreiborza andreiborza deleted the ab/remix-orchestrion-e2e branch July 14, 2026 07:37
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 E2E test app for orchestrion instrumentations on Remix

2 participants