fix(nodejs): flush configured exporter in parametric client - #7819
Merged
Merged
Conversation
OTLP export has no Agent writer, so the Node.js parametric flush route returns HTTP 500. The test can also read the agent before the asynchronous OTLP request arrives. Call the exporter's flush method when it exists. Older OTLP exporters send on span finish and have no flush method. Assert flush success in the OTLP test and wait for agent receipt. Test-only; no tracer production code changes. Refs: https://github.com/DataDog/dd-trace-js/actions/runs/35898571677/job/107308783865
Contributor
|
|
BridgeAR
marked this pull request as ready for review
September 24, 2026 19:46
cbeauchesne
approved these changes
Sep 25, 2026
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.
The Node.js parametric client dereferences the Agent writer in
/trace/span/flush.OTEL_TRACES_EXPORTER=otlpselects an exporter without that writer, so the route returns HTTP 500 and the system-test job reports no OTLP request.Call the configured exporter's
flushmethod when it exists. Older OTLP exporters send on span finish and have no flush method. The OTLP test asserts flush success and waits for the request to reach the agent.