/** * @fileoverview Application entry point with OpenTelemetry integration * * IMPORTANT: Tracing must be imported first to ensure proper instrumentation */ // Import tracing FIRST import './tracing'; import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); // Enable CORS for development app.enableCors(); // Global prefix for API routes app.setGlobalPrefix('api'); const port = process.env.PORT || 3000; await app.listen(port); console.log(`Application is running on: http://localhost:${port}`); console.log(`OpenTelemetry traces will be available in your configured backend`); } bootstrap().catch((error) => { console.error('Failed to start application:', error); process.exit(1); });