Sprint 3 batch 3: OpenTelemetry tracing (opt-in)#131
Merged
Conversation
src/tracing.ts boots a NodeSDK with auto-instrumentations for
http/express/pg/mysql/redis when OTEL_EXPORTER_OTLP_ENDPOINT is set;
otherwise it's a no-op so the default install ships nothing.
Auto-instrumentations:
- fs spans disabled (one per file read on cold start = noise)
- http instrumentation ignores /health to keep liveness probes out
of the trace stream
Service identity attaches service.name / service.version /
deployment.environment.name from env (OTEL_SERVICE_NAME etc.) with
sensible defaults from npm_package_version + NODE_ENV.
main.ts calls startTracing() before NestFactory.create so the
instrumentations register before any of NestJS pulls in the modules
they wrap.
Sentry continues to work in parallel — operators who set both
SENTRY_DSN and OTEL_EXPORTER_OTLP_ENDPOINT get errors in Sentry and
traces in their OTLP collector.
keysersoft
force-pushed
the
keysersoft/otel
branch
from
May 3, 2026 12:19
f9dcad3 to
538d31e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Boots a NodeSDK with auto-instrumentations for http/express/pg/mysql/redis when
OTEL_EXPORTER_OTLP_ENDPOINTis set. No-op otherwise. fs spans and/healthignored to keep noise out of the stream. Service identity attaches via standardservice.name/service.version/deployment.environment.namesemconv keys.main.tscallsstartTracing()beforeNestFactory.createso the instrumentations register before NestJS pulls in the modules they wrap.Verified: backend 554/555, tsc clean.