[nodejs] add dynamic detection for Remote Enablement capabilities#5894
Merged
dd-mergequeue[bot] merged 2 commits intomainfrom Dec 19, 2025
Merged
Conversation
Add feature detection for Node.js Remote Enablement capabilities to allow `system-tests` to pass in three scenarios: 1. On master before dd-trace-js#7137 lands (no RE support) 2. On dd-trace-js#7137 during testing (version "6.0.0-pre") 3. After PR lands in unknown release version (5.82.0 or later) Instead of hardcoding version numbers, detect Remote Enablement support by checking if `APM_TRACING_MULTICONFIG` capability is present. When detected, expect all RE capabilities: - `APM_TRACING_MULTICONFIG` - `APM_TRACING_ENABLE_DYNAMIC_INSTRUMENTATION` - `APM_TRACING_ENABLE_CODE_ORIGIN` - `APM_TRACING_ENABLE_LIVE_DEBUGGING` This allows merging `system-tests` before the `dd-trace-js` PR while ensuring tests pass on both old and new tracer versions.
Contributor
|
|
Contributor
Author
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
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.

Motivation
The Node.js tracer is adding Remote Enablement support via DataDog/dd-trace-js#7137, which introduces new remote configuration capabilities. However, we face a chicken-and-egg problem:
This PR solves the problem by using feature detection instead of version numbers.
Changes
Modified
test_default_capability_completenessto dynamically detect Node.js Remote Enablement support:APM_TRACING_MULTICONFIGcapability is present (marker for RE support)APM_TRACING_MULTICONFIGAPM_TRACING_ENABLE_DYNAMIC_INSTRUMENTATIONAPM_TRACING_ENABLE_CODE_ORIGINAPM_TRACING_ENABLE_LIVE_DEBUGGINGThis allows:
Cleanup plan: Once DataDog/dd-trace-js#7137 lands and becomes the minimum supported version, these capabilities should be moved to the static
DEFAULT_SUPPORTED_CAPABILITIES_BY_LANG["nodejs"]list and the dynamic check removed.Workflow
🚀 Once your PR is reviewed and the CI green, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
[<language>], double-check that only<language>is impacted by the changebuild-XXX-imagelabel is present