From 6d0ccb15ea36ed020d08807f70117d9b5de46247 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Thu, 13 Feb 2025 16:42:56 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7(y-provider)=20add=20missing=20Sent?= =?UTF-8?q?ry=20environment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The environment was missing in the Sentry configuration. This commit adds the environment to the Sentry configuration. --- src/frontend/servers/y-provider/src/env.ts | 5 +++-- src/frontend/servers/y-provider/src/services/sentry.ts | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/frontend/servers/y-provider/src/env.ts b/src/frontend/servers/y-provider/src/env.ts index 7f23bfc5..a4f86dd9 100644 --- a/src/frontend/servers/y-provider/src/env.ts +++ b/src/frontend/servers/y-provider/src/env.ts @@ -4,7 +4,8 @@ export const COLLABORATION_SERVER_ORIGIN = process.env.COLLABORATION_SERVER_ORIGIN || 'http://localhost:3000'; export const COLLABORATION_SERVER_SECRET = process.env.COLLABORATION_SERVER_SECRET || 'secret-api-key'; -export const Y_PROVIDER_API_KEY = - process.env.Y_PROVIDER_API_KEY || 'yprovider-api-key'; export const PORT = Number(process.env.PORT || 4444); export const SENTRY_DSN = process.env.SENTRY_DSN || ''; +export const SENTRY_ENV = process.env.SENTRY_ENV || 'Development'; +export const Y_PROVIDER_API_KEY = + process.env.Y_PROVIDER_API_KEY || 'yprovider-api-key'; diff --git a/src/frontend/servers/y-provider/src/services/sentry.ts b/src/frontend/servers/y-provider/src/services/sentry.ts index 9857777a..25463142 100644 --- a/src/frontend/servers/y-provider/src/services/sentry.ts +++ b/src/frontend/servers/y-provider/src/services/sentry.ts @@ -1,11 +1,12 @@ import * as Sentry from '@sentry/node'; import { nodeProfilingIntegration } from '@sentry/profiling-node'; -import { SENTRY_DSN } from '../env'; +import { SENTRY_DSN, SENTRY_ENV } from '../env'; Sentry.init({ dsn: SENTRY_DSN, integrations: [nodeProfilingIntegration()], tracesSampleRate: 0.1, profilesSampleRate: 1.0, + environment: SENTRY_ENV, });