Overview
Implement the OpenTelemetry integration for the TypeScript (Fastify + Prisma) service as specified in src/typescript/docs/adr/008-opentelemetry.md.
Parent issue: #14
Tasks
Instrumentation summary
| Signal |
Mechanism |
Type |
| Traces – Inbound HTTP |
instrumentation-fastify + instrumentation-http |
Config only |
| Traces – Outbound HTTP |
instrumentation-http / instrumentation-undici |
Config only |
| Traces – Database |
@prisma/instrumentation |
Config only |
| Metrics – HTTP server |
instrumentation-http (auto-emitted) |
Config only |
| Logs |
Manual Fastify onRequest hook + OTel API |
Custom code |
Acceptance criteria
- SDK is a no-op when
OTEL_EXPORTER_OTLP_ENDPOINT is not set
- All three pillars (traces, metrics, logs) emit data when collector is configured
- Existing tests continue to pass
Overview
Implement the OpenTelemetry integration for the TypeScript (Fastify + Prisma) service as specified in
src/typescript/docs/adr/008-opentelemetry.md.Parent issue: #14
Tasks
@opentelemetry/api,@opentelemetry/sdk-node,@opentelemetry/auto-instrumentations-node,@opentelemetry/exporter-trace-otlp-grpc,@opentelemetry/exporter-metrics-otlp-grpc,@prisma/instrumentation)OTEL_EXPORTER_OTLP_ENDPOINTis absent)FastifyInstrumentation+HttpInstrumentationfor inbound HTTP tracesUndiciInstrumentationfor outbound HTTP tracesPrismaInstrumentationfor database tracestrace.getActiveSpan())http.server.request.duration,http.server.active_requestsservice.name=lamp-control-api-typescript,service.version,deployment.environmentInstrumentation summary
instrumentation-fastify+instrumentation-httpinstrumentation-http/instrumentation-undici@prisma/instrumentationinstrumentation-http(auto-emitted)onRequesthook + OTel APIAcceptance criteria
OTEL_EXPORTER_OTLP_ENDPOINTis not set