diff --git a/devops/otel/collector-config.dev.yaml b/devops/otel/collector-config.dev.yaml index 1ec7418..4fcc89b 100644 --- a/devops/otel/collector-config.dev.yaml +++ b/devops/otel/collector-config.dev.yaml @@ -3,6 +3,8 @@ receivers: protocols: grpc: endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 exporters: debug: diff --git a/src/app.ts b/src/app.ts index 816a18a..9714312 100644 --- a/src/app.ts +++ b/src/app.ts @@ -85,3 +85,7 @@ app.get('/health', (_, reply) => { status: 'healthy' }) }) + +app.get('/favicon.ico', (request, reply) => { + return reply.status(204).send() +}) diff --git a/src/shared/infra/telemetry/otel.ts b/src/shared/infra/telemetry/otel.ts index b70fd6c..32d5b0f 100644 --- a/src/shared/infra/telemetry/otel.ts +++ b/src/shared/infra/telemetry/otel.ts @@ -60,7 +60,16 @@ const sdk = new NodeSDK({ getNodeAutoInstrumentations({ '@opentelemetry/instrumentation-http': { ignoreIncomingRequestHook: req => - ['/health'].some(p => req.url?.startsWith(p)) + ['/health', '/favicon.ico'].some(p => req.url?.startsWith(p)) + }, + '@opentelemetry/instrumentation-grpc': { + enabled: false + }, + '@opentelemetry/instrumentation-fs': { + enabled: false + }, + '@opentelemetry/instrumentation-dns': { + enabled: false } }), fastifyOtelInstrumentation