fix(server): otel not working due to port conflicts after combining containers (#10078)

fix: otel not working due to port conflicts after combining containers

Fixes #9759
This commit is contained in:
Zack Pollard 2024-06-10 17:01:04 +01:00 committed by GitHub
parent 20efd82461
commit 2f2aecfb47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 44 additions and 26 deletions

View file

@ -4,10 +4,12 @@ import { MicroservicesModule } from 'src/app.module';
import { envName, serverVersion } from 'src/constants';
import { ILoggerRepository } from 'src/interfaces/logger.interface';
import { WebSocketAdapter } from 'src/middleware/websocket.adapter';
import { otelSDK } from 'src/utils/instrumentation';
import { otelStart } from 'src/utils/instrumentation';
export async function bootstrap() {
otelSDK.start();
const otelPort = Number.parseInt(process.env.IMMICH_MICROSERVICES_METRICS_PORT ?? '8082');
otelStart(otelPort);
const app = await NestFactory.create(MicroservicesModule, { bufferLogs: true });
const logger = await app.resolve(ILoggerRepository);