From 5983e87abeb1d94bcd5713cffa387165df96b086 Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Tue, 4 Feb 2025 15:23:10 +0100 Subject: [PATCH] feat(nuxt): Detect Azure Function runtime --- packages/nuxt/src/runtime/plugins/sentry.server.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/nuxt/src/runtime/plugins/sentry.server.ts b/packages/nuxt/src/runtime/plugins/sentry.server.ts index 6152c0b63380..5d828775b62f 100644 --- a/packages/nuxt/src/runtime/plugins/sentry.server.ts +++ b/packages/nuxt/src/runtime/plugins/sentry.server.ts @@ -52,7 +52,11 @@ export default defineNitroPlugin(nitroApp => { }); async function flushIfServerless(): Promise { - const isServerless = !!process.env.LAMBDA_TASK_ROOT || !!process.env.VERCEL || !!process.env.NETLIFY; + const isServerless = + !!process.env.FUNCTIONS_WORKER_RUNTIME || // Azure Functions + !!process.env.LAMBDA_TASK_ROOT || // AWS Lambda + !!process.env.VERCEL || + !!process.env.NETLIFY; // @ts-expect-error This is not typed if (GLOBAL_OBJ[Symbol.for('@vercel/request-context')]) {