mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-18 10:41:56 +10:00
add release version to sentry ci process
This commit is contained in:
@ -2,6 +2,7 @@ import { registerAs } from '@nestjs/config';
|
||||
|
||||
export default registerAs('app', () => ({
|
||||
timezone: process.env.TZ,
|
||||
version: process.env.VERSION,
|
||||
environment: process.env.NODE_ENV,
|
||||
secretKey: process.env.SECRET_KEY,
|
||||
port: parseInt(process.env.PORT, 10) || 3100,
|
||||
|
||||
@ -15,6 +15,7 @@ const validationSchema = Joi.object({
|
||||
// App
|
||||
TZ: Joi.string().default('UTC'),
|
||||
PORT: Joi.number().default(3100),
|
||||
VERSION: Joi.string().required(),
|
||||
SECRET_KEY: Joi.string().required(),
|
||||
NODE_ENV: Joi.string().valid('development', 'production').default('development'),
|
||||
|
||||
|
||||
@ -23,9 +23,12 @@ const bootstrap = async () => {
|
||||
|
||||
// Sentry Error Logging
|
||||
const sentryDSN = configService.get<string>('logging.sentryDSN');
|
||||
const version = configService.get<string>('app.version');
|
||||
|
||||
if (sentryDSN) {
|
||||
Sentry.init({
|
||||
dsn: sentryDSN,
|
||||
release: version,
|
||||
tracesSampleRate: 1.0,
|
||||
enabled: process.env.NODE_ENV === 'production',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user