From 9e509aa685c41876952312068145fd4c63aba33e Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Fri, 18 Oct 2024 13:51:57 +0200 Subject: [PATCH 1/2] feat(nuxt): Log server instrumentation might not work in dev --- packages/nuxt/src/module.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/nuxt/src/module.ts b/packages/nuxt/src/module.ts index 77bf8edd77de..02e1a3ac5c44 100644 --- a/packages/nuxt/src/module.ts +++ b/packages/nuxt/src/module.ts @@ -74,6 +74,15 @@ export default defineNuxtModule({ nuxt.hooks.hook('nitro:init', nitro => { if (serverConfigFile && serverConfigFile.includes('.server.config')) { + if (nitro.options.dev) { + consoleSandbox(() => { + // eslint-disable-next-line no-console + console.log( + '[Sentry] Your application is running in development mode. Note: @sentry/nuxt is in beta and may not work as expected on the server-side (Nitro).', + ); + }); + } + if (moduleOptions.dynamicImportForServerEntry === false) { addServerConfigToBuild(moduleOptions, nuxt, nitro, serverConfigFile); From 69974703bcabfc39946a619923548b30fe5c20a3 Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Fri, 18 Oct 2024 14:04:56 +0200 Subject: [PATCH 2/2] review comment --- packages/nuxt/src/module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt/src/module.ts b/packages/nuxt/src/module.ts index 02e1a3ac5c44..56fa71ad95a3 100644 --- a/packages/nuxt/src/module.ts +++ b/packages/nuxt/src/module.ts @@ -78,7 +78,7 @@ export default defineNuxtModule({ consoleSandbox(() => { // eslint-disable-next-line no-console console.log( - '[Sentry] Your application is running in development mode. Note: @sentry/nuxt is in beta and may not work as expected on the server-side (Nitro).', + '[Sentry] Your application is running in development mode. Note: @sentry/nuxt is in beta and may not work as expected on the server-side (Nitro). Errors are reported, but tracing does not work.', ); }); }