diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts index 9b803ca..f053bcc 100644 --- a/apps/api/src/main.ts +++ b/apps/api/src/main.ts @@ -1,3 +1,9 @@ +// Otel must be imported before any other modules +import { + otelEnabled, + otelSDK, +} from '@nx-next-nest-prisma-ory-template/opentelemetry'; + import { ValidationPipe } from '@nestjs/common'; import { NestFactory } from '@nestjs/core'; import { @@ -11,10 +17,6 @@ import { } from '@nx-next-nest-prisma-ory-template/error'; import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; import { ResponseFormatterInterceptor } from '@nx-next-nest-prisma-ory-template/utils'; -import { - otelEnabled, - otelSDK, -} from '@nx-next-nest-prisma-ory-template/opentelemetry'; import { Logger } from 'nestjs-pino'; async function bootstrap() {