Repository navigation
Conversation
Ports the tracing subsystem from nodejs/node#66587 into this package, minus the core integration points: no NODE_OTEL* environment variables and no --experimental-otel flag. Configuration is a single exported init(options) API instead, with a serviceName option replacing the OTEL_SERVICE_NAME environment read. Also exports isActive() and flush(). One deliberate divergence from the upstream implementation: init() rejects endpoint protocols other than http: and https: up front. The core version only warns at export time, which is fine when activation happens once at startup from an environment variable, but a programmatic API that throws on invalid options should not silently accept an endpoint it can never export to. Includes the ported test suite (node --test, 48 tests), a benchmark of the HTTP hot path, and README documentation of the init() options, instrumented operations, and W3C trace context propagation. Refs: nodejs/node#66587 Signed-off-by: Bryan English <bryan.english@datadoghq.com>
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.
Ports the tracing subsystem from nodejs/node#66587 into this package as a standalone library.
The core integration points are intentionally left out: no NODE_OTEL* environment variables and no --experimental-otel flag. All configuration goes through a single exported init(options) API, with a serviceName option replacing the OTEL_SERVICE_NAME environment read. isActive() and flush() are also exported.
One deliberate divergence: init() rejects endpoint protocols other than http: and https: up front. The core version only warns at export time, which is fine for startup-time activation from an environment variable, but a programmatic API that throws on invalid options should not accept an endpoint it can never export to.
Includes the ported test suite (48 tests, node --test, all green), a benchmark of the HTTP hot path, and README docs for the init() options, instrumented operations, and W3C trace context propagation.
Refs: nodejs/node#66587