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:
@ -64,8 +64,6 @@ WORKDIR /app/packages/twenty-server
|
|||||||
|
|
||||||
ARG REACT_APP_SERVER_BASE_URL
|
ARG REACT_APP_SERVER_BASE_URL
|
||||||
ENV REACT_APP_SERVER_BASE_URL $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
|
ARG APP_VERSION
|
||||||
ENV APP_VERSION $APP_VERSION
|
ENV APP_VERSION $APP_VERSION
|
||||||
|
|||||||
@ -42,7 +42,6 @@ FRONTEND_URL=http://localhost:3001
|
|||||||
# EXCEPTION_HANDLER_DRIVER=sentry
|
# EXCEPTION_HANDLER_DRIVER=sentry
|
||||||
# METER_DRIVER=opentelemetry,console
|
# METER_DRIVER=opentelemetry,console
|
||||||
# SENTRY_ENVIRONMENT=main
|
# SENTRY_ENVIRONMENT=main
|
||||||
# SENTRY_RELEASE=latest
|
|
||||||
# SENTRY_DSN=https://xxx@xxx.ingest.sentry.io/xxx
|
# SENTRY_DSN=https://xxx@xxx.ingest.sentry.io/xxx
|
||||||
# SENTRY_FRONT_DSN=https://xxx@xxx.ingest.sentry.io/xxx
|
# SENTRY_FRONT_DSN=https://xxx@xxx.ingest.sentry.io/xxx
|
||||||
# LOG_LEVELS=error,warn
|
# LOG_LEVELS=error,warn
|
||||||
|
|||||||
@ -63,7 +63,7 @@ export class ClientConfigResolver {
|
|||||||
},
|
},
|
||||||
sentry: {
|
sentry: {
|
||||||
environment: this.twentyConfigService.get('SENTRY_ENVIRONMENT'),
|
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'),
|
dsn: this.twentyConfigService.get('SENTRY_FRONT_DSN'),
|
||||||
},
|
},
|
||||||
captcha: {
|
captcha: {
|
||||||
|
|||||||
@ -29,7 +29,7 @@ export const exceptionHandlerModuleFactory = async (
|
|||||||
type: ExceptionHandlerDriver.Sentry,
|
type: ExceptionHandlerDriver.Sentry,
|
||||||
options: {
|
options: {
|
||||||
environment: twentyConfigService.get('SENTRY_ENVIRONMENT'),
|
environment: twentyConfigService.get('SENTRY_ENVIRONMENT'),
|
||||||
release: twentyConfigService.get('SENTRY_RELEASE'),
|
release: twentyConfigService.get('APP_VERSION'),
|
||||||
dsn: twentyConfigService.get('SENTRY_DSN') ?? '',
|
dsn: twentyConfigService.get('SENTRY_DSN') ?? '',
|
||||||
serverInstance: adapterHost.httpAdapter?.getInstance(),
|
serverInstance: adapterHost.httpAdapter?.getInstance(),
|
||||||
debug:
|
debug:
|
||||||
|
|||||||
@ -660,17 +660,6 @@ export class ConfigVariables {
|
|||||||
@IsString()
|
@IsString()
|
||||||
SENTRY_FRONT_DSN: string;
|
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({
|
@ConfigVariablesMetadata({
|
||||||
group: ConfigVariablesGroup.ExceptionHandler,
|
group: ConfigVariablesGroup.ExceptionHandler,
|
||||||
description: 'Environment name for Sentry logging',
|
description: 'Environment name for Sentry logging',
|
||||||
|
|||||||
@ -26,7 +26,7 @@ const meterDrivers = parseArrayEnvVar(
|
|||||||
if (process.env.EXCEPTION_HANDLER_DRIVER === ExceptionHandlerDriver.Sentry) {
|
if (process.env.EXCEPTION_HANDLER_DRIVER === ExceptionHandlerDriver.Sentry) {
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
environment: process.env.SENTRY_ENVIRONMENT,
|
environment: process.env.SENTRY_ENVIRONMENT,
|
||||||
release: process.env.SENTRY_RELEASE,
|
release: process.env.APP_VERSION,
|
||||||
dsn: process.env.SENTRY_DSN,
|
dsn: process.env.SENTRY_DSN,
|
||||||
integrations: [
|
integrations: [
|
||||||
// TODO: Redis integration doesn't seem to work - investigate why
|
// TODO: Redis integration doesn't seem to work - investigate why
|
||||||
|
|||||||
@ -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'"],
|
['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'"],
|
['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_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_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'],
|
['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' "],
|
['METER_DRIVER', 'console', "The meter driver can be: 'console' and/or 'opentelemetry' "],
|
||||||
|
|||||||
Reference in New Issue
Block a user