Skip to content

feat(cpp): enable stable config telemetry tests#6554

Draft
bm1549 wants to merge 10 commits intomainfrom
bm1549/stable-configuration-cpp
Draft

feat(cpp): enable stable config telemetry tests#6554
bm1549 wants to merge 10 commits intomainfrom
bm1549/stable-configuration-cpp

Conversation

@bm1549
Copy link
Contributor

@bm1549 bm1549 commented Mar 20, 2026

Motivation

Enable stable configuration telemetry tests for the C++ tracer. This is the system-tests companion to DataDog/dd-trace-cpp#294 which implements Phase 1 Stable Configuration in dd-trace-cpp.

Changes

  • tests/parametric/test_telemetry.py: Added cpp entries to telemetry_name_mapping for 8 config keys (logs_injection_enabled, profiling_enabled, data_streams_enabled, runtime_metrics_enabled, dynamic_instrumentation_enabled, trace_debug_enabled, tags, trace_propagation_style). C++ reports these using DD_* key names, matching the Go/.NET pattern.
  • manifests/cpp.yml: Removed missing_feature declarations for Test_Stable_Configuration_Origin and its extended config sub-tests.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on your PR until the CI passes
  3. Mark it as ready for review

🛟 #apm-shared-testing 🛟

🤖 Generated with Claude Code

Add cpp entries to telemetry_name_mapping for non-native stable config
keys (DD_LOGS_INJECTION, DD_PROFILING_ENABLED, DD_DYNAMIC_INSTRUMENTATION_ENABLED,
DD_TRACE_DEBUG, DD_RUNTIME_METRICS_ENABLED, DD_DATA_STREAMS_ENABLED,
DD_TAGS, DD_TRACE_PROPAGATION_STYLE).

Remove the missing_feature manifest entries for
Test_Stable_Configuration_Origin since dd-trace-cpp now reports these
configs in telemetry.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@bm1549 bm1549 added the ai-generated The pull request includes a significant amount of AI-generated code label Mar 20, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2026

CODEOWNERS have been resolved as:

manifests/cpp.yml                                                       @DataDog/dd-trace-cpp
tests/parametric/test_config_consistency.py                             @DataDog/apm-sdk-capabilities
tests/parametric/test_telemetry.py                                      @DataDog/system-tests-core @DataDog/apm-sdk-capabilities

@datadog-prod-us1-3
Copy link

datadog-prod-us1-3 bot commented Mar 20, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 97a81e4 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

bm1549 and others added 3 commits March 20, 2026 13:59
C++ doesn't natively support profiling, runtime metrics, data streams,
or logs injection — it should not be expected to report default values
for these products. Empty the default config dict for C++.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
C++ natively reports trace_enabled, so include it in the default config
checks to verify that setting one stable config value doesn't affect
the native config values.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…and product-specific classes

Split Test_Stable_Configuration_Origin into two classes:
- Test_Stable_Configuration_Origin: uses DD_TRACE_ENABLED and DD_VERSION (universal, all languages including C++)
- Test_Stable_Configuration_Origin_Product_Enablement: uses product-specific configs (logs injection, DI, etc.)

Update all manifests to reference the new class for extended config tests, add
missing_feature for cpp on the product enablement class, and add type: ignore
comment for mypy on SDK_DEFAULT_STABLE_CONFIG.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@bm1549 bm1549 changed the title feat(cpp): enable stable config telemetry tests feat(cpp): enable stable config telemetry tests [cpp@bm1549/stable-configuration] Mar 20, 2026
bm1549 and others added 4 commits March 20, 2026 15:06
The universal Test_Stable_Configuration_Origin tests only check fleet
stable config origin using DD_TRACE_ENABLED, which all tracers report
in telemetry. Removed DD_VERSION/application_version checks since not
all tracers report that with stable config origin. Local-only origin
testing remains in Test_Stable_Configuration_Origin_Product_Enablement.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
dd-trace-cpp does not emit non-native config keys (DD_LOGS_INJECTION,
DD_PROFILING_ENABLED, etc.) in telemetry. These mappings were left over
from a removed AdditionalConfigEntry mechanism. Only native configs
(trace_enabled, env, service, etc.) are reported, and those use
standard names that don't need remapping.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…arams

Replace deeply nested inline ternaries with a helper function and
dict.get() lookups. The per-language defaults are now clearly documented
in _build_sdk_default_stable_config() instead of being buried in
unreadable conditional chains.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Rename Test_Stable_Configuration_Origin -> Test_Stable_Configuration_Origin
  (keep original name for the product-specific class)
- Rename the universal class to Test_Stable_Configuration_Single_Config_Origin
- Extract _find_telemetry_config() and _assert_telemetry_config_origin()
  shared helpers to eliminate repeated lookup+assert patterns
- Revert manifest references back to original Test_Stable_Configuration_Origin

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@bm1549 bm1549 force-pushed the bm1549/stable-configuration-cpp branch from 46240e1 to 502e39f Compare March 20, 2026 19:37
Keep a single Test_Stable_Configuration_Origin class with C++ carve-outs:
- test_stable_configuration_origin: C++ uses DD_TRACE_ENABLED (the only
  config it reports in telemetry) instead of product-specific configs
- test_stable_configuration_config_id: C++ tests fleet config_id with
  DD_TRACE_ENABLED; skips local config check (no product configs)
- Extended config tests remain missing_feature for C++

Also refactors SDK_DEFAULT_STABLE_CONFIG into a readable helper function
and simplifies inline ternary chains in test parametrizations.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@bm1549 bm1549 changed the title feat(cpp): enable stable config telemetry tests [cpp@bm1549/stable-configuration] feat(cpp): enable stable config telemetry tests Mar 20, 2026
The released C++ parametric image doesn't have stable config yet.
Mark the entire class as missing_feature until dd-trace-cpp#294 is
released. The origin + config_id tests will xpass once the image
is updated; extended config tests stay missing_feature permanently.

Also removed [cpp@branch] from PR title since system-tests CI applies
the target branch globally to all languages, breaking non-cpp builds.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated The pull request includes a significant amount of AI-generated code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant