Deprecate Sentry release (#11651)

Let's deprecate Sentry Release and use APP_VERSION instead. 

It'll make it more clear in the interface to use named version for bug
analysis, than commit sha
This commit is contained in:
Félix Malfait
2025-04-18 15:48:48 +02:00
committed by GitHub
parent fba4192d4b
commit cf5649a1df
7 changed files with 3 additions and 18 deletions

View File

@ -64,8 +64,6 @@ WORKDIR /app/packages/twenty-server
ARG REACT_APP_SERVER_BASE_URL
ENV REACT_APP_SERVER_BASE_URL $REACT_APP_SERVER_BASE_URL
ARG SENTRY_RELEASE
ENV SENTRY_RELEASE $SENTRY_RELEASE
ARG APP_VERSION
ENV APP_VERSION $APP_VERSION

View File

@ -42,7 +42,6 @@ FRONTEND_URL=http://localhost:3001
# EXCEPTION_HANDLER_DRIVER=sentry
# METER_DRIVER=opentelemetry,console
# SENTRY_ENVIRONMENT=main
# SENTRY_RELEASE=latest
# SENTRY_DSN=https://xxx@xxx.ingest.sentry.io/xxx
# SENTRY_FRONT_DSN=https://xxx@xxx.ingest.sentry.io/xxx
# LOG_LEVELS=error,warn

View File

@ -63,7 +63,7 @@ export class ClientConfigResolver {
},
sentry: {
environment: this.twentyConfigService.get('SENTRY_ENVIRONMENT'),
release: this.twentyConfigService.get('SENTRY_RELEASE'),
release: this.twentyConfigService.get('APP_VERSION'),
dsn: this.twentyConfigService.get('SENTRY_FRONT_DSN'),
},
captcha: {

View File

@ -29,7 +29,7 @@ export const exceptionHandlerModuleFactory = async (
type: ExceptionHandlerDriver.Sentry,
options: {
environment: twentyConfigService.get('SENTRY_ENVIRONMENT'),
release: twentyConfigService.get('SENTRY_RELEASE'),
release: twentyConfigService.get('APP_VERSION'),
dsn: twentyConfigService.get('SENTRY_DSN') ?? '',
serverInstance: adapterHost.httpAdapter?.getInstance(),
debug:

View File

@ -660,17 +660,6 @@ export class ConfigVariables {
@IsString()
SENTRY_FRONT_DSN: string;
@ConfigVariablesMetadata({
group: ConfigVariablesGroup.ExceptionHandler,
description: 'Release version for Sentry logging',
})
@ValidateIf(
(env) => env.EXCEPTION_HANDLER_DRIVER === ExceptionHandlerDriver.Sentry,
)
@IsString()
@IsOptional()
SENTRY_RELEASE: string;
@ConfigVariablesMetadata({
group: ConfigVariablesGroup.ExceptionHandler,
description: 'Environment name for Sentry logging',

View File

@ -26,7 +26,7 @@ const meterDrivers = parseArrayEnvVar(
if (process.env.EXCEPTION_HANDLER_DRIVER === ExceptionHandlerDriver.Sentry) {
Sentry.init({
environment: process.env.SENTRY_ENVIRONMENT,
release: process.env.SENTRY_RELEASE,
release: process.env.APP_VERSION,
dsn: process.env.SENTRY_DSN,
integrations: [
// TODO: Redis integration doesn't seem to work - investigate why

View File

@ -287,7 +287,6 @@ yarn command:prod cron:calendar:ongoing-stale
['LOG_LEVELS', 'error,warn', "The loglevels which are logged to the logging driver. Can include: 'log', 'warn', 'error'"],
['EXCEPTION_HANDLER_DRIVER', 'sentry', "The exception handler driver can be: 'console' or 'sentry'"],
['SENTRY_ENVIRONMENT', 'main', 'The sentry environment used if sentry logging driver is selected'],
['SENTRY_RELEASE', 'latest', 'The sentry release used if sentry logging driver is selected'],
['SENTRY_DSN', 'https://xxx@xxx.ingest.sentry.io/xxx', 'The sentry logging endpoint used if sentry logging driver is selected'],
['SENTRY_FRONT_DSN', 'https://xxx@xxx.ingest.sentry.io/xxx', 'The sentry logging endpoint used by the frontend if sentry logging driver is selected'],
['METER_DRIVER', 'console', "The meter driver can be: 'console' and/or 'opentelemetry' "],