hunk.code_window:   }),
     WORKER_DEFAULT_LOCK_DURATION: num({
       default: undefined,
     }),
   };
   if (process.env.STORAGE_SERVICE === 'AZURE') {
     validators.AZURE_ACCOUNT_NAME = str();
     validators.AZURE_ACCOUNT_KEY = str();
  
hunk.labels: keep keep keep add keep keep keep keep keep
hunk.after_edit:   ENABLE_OTEL_SDK: str({
       default: 'false',
       choices: ['false', 'true'],
     }),
  
hunk.file_path: apps/api/src/config/env-validator.ts
hunk.type: add
file: import './config';
  import { INestApplication } from '@nestjs/common';
  import { NestFactory } from '@nestjs/core';
  import * as Sentry from '@sentry/node';
  import { getErrorInterceptor, Logger, initializeOtelSdk } from '@novu/application-generic';
  import * as packageJson from '../package.json';
  
  import { AppModule } from './app.module';
  
  if (process.env.SENTRY_DSN) {
    Sentry.init({
      dsn: process.env.SENTRY_DSN,
      environment: process.env.NODE_ENV,
      release: `v${packageJson.version}`,
    });
  }
  
  const otelSDK = initializeOtelSdk(packageJson.name);
  
  export async function bootstrap(): Promise<INestApplication> {
    await otelSDK.start();
    const app = await NestFactory.create(AppModule, { bufferLogs: true });
  
    app.useLogger(app.get(Logger));
    app.flushLogs();
  
    app.useGlobalInterceptors(getErrorInterceptor());
  
    app.enableCors({
      origin: '*',
      preflightContinue: false,
      allowedHeaders: ['Content-Type', 'Authorization'],
      methods: ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
    });
  
    await app.listen(process.env.PORT);
  
    return app;
  }
  
  process.on('SIGTERM', () => {
    otelSDK
      .shutdown()
      .then(
        () => console.log('SDK shut down successfully'),
        (err) => console.log('Error shutting down SDK', err)
      )
      .finally(() => process.exit(0));
  });
  