test(e2e): Add E2E test app for orchestrion instrumentations on Remix#22218
Conversation
Closes: #21998 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| return new Promise<{ status: string }>(resolve => { | ||
| connection.query('SELECT 1 + 1 AS solution', () => { | ||
| connection.query('SELECT NOW()', ['1', '2'], () => { | ||
| resolve({ status: 'ok' }); | ||
| }); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
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.
| // 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(), |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
What
Adds a Remix (v2, Vite) E2E test app that exercises orchestrion-based auto-instrumentation for
mysqlandioredis.vite.config.tswiressentryRemixVitePlugin()+sentryOrchestrionPlugin()to injectdiagnostics_channelcalls into the bundled DB drivers at build time.instrument.server.cjsopts in viaexperimentalUseDiagnosticsChannelInjection()beforeSentry.init(), loaded through--require./db-mysqland/db-ioredisrun each driver in a loader;tests/db.test.tsasserts theauto.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