mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-24 12:29:09 +00:00
FIX: conditionally importing apm
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
export const startAPm = async () => {
|
||||
if (process.env.ENV !== 'local')
|
||||
return await import('elastic-apm-node/start');
|
||||
};
|
||||
startAPm();
|
||||
+1
-3
@@ -1,6 +1,6 @@
|
||||
import './apm';
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
||||
import { writeFileSync } from 'fs';
|
||||
import helmet from 'helmet';
|
||||
import { DadosferaLogger } from 'dadosfera-logs';
|
||||
|
||||
@@ -9,8 +9,6 @@ import documentEmpty from '../swagger_empty.json';
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
async function bootstrap() {
|
||||
if (process.env.ENV !== 'local') await import('elastic-apm-node/start');
|
||||
|
||||
DadosferaLogger.setupLogger({
|
||||
serviceName: 'maestro',
|
||||
serviceEnvironment: process.env.ENV,
|
||||
|
||||
Reference in New Issue
Block a user