feat(SPG-126) Monitoring APM

pull/2/head
ashar 2024-05-31 11:07:34 +07:00
parent 9ce4c58dc1
commit b945ef1e10
2 changed files with 14 additions and 6 deletions

View File

@ -15,6 +15,7 @@ import { CouchModule } from './modules/configuration/couch/couch.module';
@Module({
imports: [
ApmModule.register(),
ConfigModule.forRoot({
isGlobal: true,
}),
@ -26,9 +27,7 @@ import { CouchModule } from './modules/configuration/couch/couch.module';
username: process.env.DEFAULT_DB_USER,
password: process.env.DEFAULT_DB_PASS,
database: process.env.DEFAULT_DB_NAME,
entities: [
UserPrivilegeModel,
],
entities: [UserPrivilegeModel],
synchronize: true,
}),
CqrsModule,

View File

@ -1,9 +1,18 @@
import { apm } from './core/apm';
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { ValidationPipe } from '@nestjs/common';
import { DocumentBuilder, SwaggerCustomOptions, SwaggerModule } from '@nestjs/swagger';
import {
DocumentBuilder,
SwaggerCustomOptions,
SwaggerModule,
} from '@nestjs/swagger';
async function bootstrap() {
if (apm.isStarted()) {
console.log('apm start');
}
const app = await NestFactory.create(AppModule);
app.setGlobalPrefix('api/v1');