From 86a911c144d6deb32877f3d7ef7a50754a2c1c58 Mon Sep 17 00:00:00 2001 From: Conor O'Brien Date: Fri, 13 Dec 2024 16:05:18 +0000 Subject: [PATCH] feat(node): Detect Railway release name (#14691) This change adds release name detection for Railway Based on https://github.com/getsentry/sentry-javascript/pull/12529 Related: https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/639 --- packages/node/src/sdk/api.ts | 2 ++ packages/vercel-edge/src/sdk.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/node/src/sdk/api.ts b/packages/node/src/sdk/api.ts index dd7ccc8ca75d..7e4f200d1e06 100644 --- a/packages/node/src/sdk/api.ts +++ b/packages/node/src/sdk/api.ts @@ -68,6 +68,8 @@ export function getSentryRelease(fallback?: string): string | undefined { process.env['HEROKU_TEST_RUN_COMMIT_VERSION'] || // Heroku #2 https://docs.sentry.io/product/integrations/deployment/heroku/#configure-releases process.env['HEROKU_SLUG_COMMIT'] || + // Railway - https://docs.railway.app/reference/variables#git-variables + process.env['RAILWAY_GIT_COMMIT_SHA'] || // Render - https://render.com/docs/environment-variables process.env['RENDER_GIT_COMMIT'] || // Semaphore CI - https://docs.semaphoreci.com/ci-cd-environment/environment-variables diff --git a/packages/vercel-edge/src/sdk.ts b/packages/vercel-edge/src/sdk.ts index 78f1f49ba092..c29e9f693ba2 100644 --- a/packages/vercel-edge/src/sdk.ts +++ b/packages/vercel-edge/src/sdk.ts @@ -268,6 +268,8 @@ export function getSentryRelease(fallback?: string): string | undefined { process.env['HEROKU_TEST_RUN_COMMIT_VERSION'] || // Heroku #2 https://docs.sentry.io/product/integrations/deployment/heroku/#configure-releases process.env['HEROKU_SLUG_COMMIT'] || + // Railway - https://docs.railway.app/reference/variables#git-variables + process.env['RAILWAY_GIT_COMMIT_SHA'] || // Render - https://render.com/docs/environment-variables process.env['RENDER_GIT_COMMIT'] || // Semaphore CI - https://docs.semaphoreci.com/ci-cd-environment/environment-variables