Skip to content

feat(otlp): decode trace semantic core registry updates - #2719

Open
webern wants to merge 2 commits into
m/otlp-semregfrom
m/otlp-semdec
Open

webern wants to merge 2 commits into
m/otlp-semregfrom
m/otlp-semdec

Conversation

@webern

@webern webern commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Human Summary

This PR adds the decoder for traces remote config semantic registry and wires it into the SemanticRegistryProvider that landed in the previous PR.

AI Summary

#2718 gives OTLP trace translation and APM stats a SemanticRegistryProvider. The provider can read a published registry or use the embedded default, but #2718 alone has no production subscription to publish remote registries. This PR supplies the missing APM_SEMANTIC_CORE_DD product decoder and a SemanticRegistryProvider::subscribe(&client) entry point. It does not construct that subscription during ADP startup; #2724 does that.

A registry JSON document describes one complete set of concept-to-attribute mappings, not a patch. #2718's parser handles one document. Here, SemanticCoreDecoder implements the RC client's ProductDecoder contract: it receives the set of configuration files currently assigned to this product, parses each file, selects a registry, and lets the RC client publish the selected snapshot to provider handles. No extra registry store or applier worker sits between the subscription and its readers.

  • With no file assigned (including removal), the decoder selects the embedded registry. If several are assigned, the last valid file in ID order wins and a warning records the unexpected multiplicity. Each valid file gets an acknowledgement; invalid files get an error. If none is valid, the assignment is rejected and the subscription retains its last accepted registry.
  • Remote documents retain supported concepts and fallbacks even when some entries are unknown; a warning reports skipped entries. Errors sent back to the Agent do not quote payload contents.
  • Tests drive the decoder and subscription with a test publisher, including replacement, removal, rejection, and updated mappings reaching the OTLP source and decoder. Until feat(adp): apply trace products from remote configuration #2724 supplies a subscribed provider (when semantic RC is enabled), production uses embedded mappings.

Change Type

  • New feature

How did you test this PR?

  • make fmt, cargo check --workspace, cargo check --workspace --tests, make check-docs, make check-clippy at the stack tip.
  • Filtered saluki-components tests: 549 passed at the stack tip.

References

@webern
webern added this pull request to stack #2721 September 30, 2026 11:18
@dd-octo-sts dd-octo-sts Bot added area/components Sources, transforms, and destinations. transform/apm-stats APM Stats transform. labels Sep 30, 2026
@webern webern added the changelog/no-changelog No changelog entry needed label Sep 30, 2026
@pr-commenter

pr-commenter Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Binary Size Analysis (Agent Data Plane)

Baseline: 216e499 · Comparison: f49a2a4 · diff
Analysis Configuration: stripped binaries · Pass/Fail Threshold: +5%
Sizes: 38.27 MiB (baseline) vs 38.25 MiB (comparison)
Size Change: -18.73 KiB (-0.05%)

✅ Binary size difference within threshold

Changes by Module
Module File Size Symbols
core +48.83 KiB 8966
tracing -27.40 KiB 9
&mut serde_json -24.53 KiB 91
saluki_metrics::mapped::MappedMetric<H> -24.51 KiB 6
saluki_components::destinations::dogstatsd_client_telemetry +23.16 KiB 31
anon.7bcce2bce1d7289ca2b67a9dabbae1a7.13.llvm.8132447645249006792 +16.18 KiB 1
anon.87e7c38bfd928d17fa28187081c51bf0.2.llvm.240572210426274404 -16.09 KiB 1
axum -15.72 KiB 415
quick_cache +14.70 KiB 117
serde_json +14.64 KiB 457
anon.87e7c38bfd928d17fa28187081c51bf0.768.llvm.240572210426274404 -14.62 KiB 1
anon.7bcce2bce1d7289ca2b67a9dabbae1a7.477.llvm.8132447645249006792 +14.62 KiB 1
saluki_common::task::instrument +14.41 KiB 18
anon.7bcce2bce1d7289ca2b67a9dabbae1a7.6.llvm.8132447645249006792 +12.84 KiB 1
anon.87e7c38bfd928d17fa28187081c51bf0.766.llvm.240572210426274404 -12.84 KiB 1
anon.9d1057ec6821611763596b0232be6ef0.693.llvm.6678353967787269721 -11.13 KiB 1
prost -11.03 KiB 321
std -10.89 KiB 251
anon.abbd254abd65a42f7feba2865e83dd56.694.llvm.4730254534436041901 +10.86 KiB 1
agent_data_plane_config::domains::traces +9.68 KiB 13
Detailed Symbol Changes
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [NEW] +59.8Ki  [NEW] +59.7Ki    saluki_components::common::datadog::io::run_endpoint_io_loop::_{{closure}}::ha38a49b72e023545
  [NEW] +42.4Ki  [NEW] +42.2Ki    _<saluki_components::forwarders::otlp::OtlpForwarder as saluki_core::components::forwarders::Forwarder>::run::_{{closure}}::hb872765f165820b0
  [NEW] +40.6Ki  [NEW] +40.5Ki    agent_data_plane::cli::run::create_topology::_{{closure}}::h75562c7ea09bcbff
  [NEW] +37.8Ki  [NEW] +37.6Ki    _<saluki_components::transforms::apm_stats::ApmStats as saluki_core::components::transforms::Transform>::run::_{{closure}}::h79ca62828ea1b270
  [NEW] +34.5Ki  [NEW] +34.4Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::h0f7a307e9cc0a16a
  [NEW] +31.0Ki  [NEW] +30.8Ki    agent_data_plane::cli::dogstatsd::run_dogstatsd_command::_{{closure}}::hdfcd4810bc0a3053
  [NEW] +29.0Ki  [NEW] +28.8Ki    datadog_agent_commons::ipc::client::RemoteAgentClient::connect::_{{closure}}::_{{closure}}::_{{closure}}::h0a198a9356f00b58
  [NEW] +28.6Ki  [NEW] +28.5Ki    agent_data_plane::dogstatsd_contexts::artifact::for_each_record::h1b4e32864ddc5f08
  [NEW] +26.6Ki  [NEW] +26.4Ki    saluki_components::destinations::dogstatsd_client_telemetry::DogStatsDClientTelemetry::record_metric::h6e61a932a14c058b
  [NEW] +25.6Ki  [NEW] +25.4Ki    agent_data_plane::internal::remote_agent::run_remote_agent_registration_loop::_{{closure}}::h044bf8d66771780c
  [DEL] -25.6Ki  [DEL] -25.4Ki    agent_data_plane::internal::remote_agent::run_remote_agent_registration_loop::_{{closure}}::h1f55b7becb8f9961
  [DEL] -25.7Ki  [DEL] -25.6Ki    core::ops::function::FnOnce::call_once::h4d6ad556f476b8c9
  [DEL] -28.4Ki  [DEL] -28.2Ki    datadog_agent_commons::ipc::client::RemoteAgentClient::connect::_{{closure}}::_{{closure}}::_{{closure}}::h1bd6a026eeafe819
  [DEL] -28.7Ki  [DEL] -28.6Ki    agent_data_plane::dogstatsd_contexts::artifact::for_each_record::hb60d5262ffff75a0
  [DEL] -31.4Ki  [DEL] -31.2Ki    agent_data_plane::cli::dogstatsd::run_dogstatsd_command::_{{closure}}::h2f5246c806e7f392
  [DEL] -34.9Ki  [DEL] -34.7Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::haa79196f741be08a
  [DEL] -35.8Ki  [DEL] -35.6Ki    _<saluki_components::transforms::apm_stats::ApmStats as saluki_core::components::transforms::Transform>::run::_{{closure}}::h8bffda5d06bacbfd
  [DEL] -40.5Ki  [DEL] -40.4Ki    agent_data_plane::cli::run::create_topology::_{{closure}}::h02ed82f16b54dbc0
  [DEL] -44.7Ki  [DEL] -44.5Ki    _<saluki_components::forwarders::otlp::OtlpForwarder as saluki_core::components::forwarders::Forwarder>::run::_{{closure}}::h252ca254b106e4c3
  -0.2% -20.4Ki  -0.5% -49.8Ki    [28882 Others]
  [DEL] -58.6Ki  [DEL] -58.5Ki    saluki_components::common::datadog::io::run_endpoint_io_loop::_{{closure}}::h15a965fc1b5a6f1e
  -0.0% -18.7Ki  -0.1% -48.2Ki    TOTAL

@pr-commenter

pr-commenter Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Regression Detector (Agent Data Plane)

Run ID: 375eb543-a95f-4df8-b756-4ce40324151e
Baseline: 216e499a · Comparison: f49a2a4c · diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment (5)

Experiments configured erratic: true are tagged (ignored) and skipped when determining which experiments regressed or improved. Experiments which are detected as erratic at runtime are tagged (erratic) to flag that the run's sample dispersion was high, but their regression / improvement signal still counts.

experiment goal Δ mean % links
quality_gates_rss_dsd_ultraheavy memory ⚪ +0.52 metrics profiles logs
quality_gates_rss_dsd_heavy memory ⚪ +0.48 metrics profiles logs
quality_gates_rss_dsd_medium memory ⚪ +0.36 metrics profiles logs
quality_gates_rss_dsd_low memory ⚪ -0.31 metrics profiles logs
quality_gates_rss_idle memory ⚪ -0.82 metrics profiles logs
Bounds Checks: ✅ Passed (5)
experiment check replicates observed links
quality_gates_rss_dsd_heavy memory_usage 10/10 ✅ 228 MiB ≤ 250 MiB metrics profiles logs
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 51 MiB ≤ 60 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 90.5 MiB ≤ 100 MiB metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 ✅ 380 MiB ≤ 420 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 33.1 MiB ≤ 40 MiB metrics profiles logs
Explanation

A change is flagged as a regression when |Δ mean %| > 5.00% in the regressing direction for its optimization goal AND SMP marks the experiment as a regression (is_regression: true). Improvements use the matching criteria for the improving direction. Experiments configured erratic: true (tagged (ignored)) are skipped outright; experiments detected as erratic at runtime (tagged (erratic)) still count, since that flag describes sample dispersion rather than directional certainty. The Δ mean % cell is colored accordingly: 🟢 = improvement, 🔴 = regression, ⚪ = neutral. Reduction in CPU or memory is an improvement; reduction in ingress throughput is a regression. Experiments tagged (no analysis) show ⚠️ n/a: SMP ran them but produced no analysis, usually because a replicate failed and exhausted its retries. Check the SMP report for that experiment's replicate failures.

@webern
webern force-pushed the m/otlp-semdec branch 2 times, most recently from b4ceeb7 to 9d18f9e Compare October 1, 2026 10:25
@dd-octo-sts dd-octo-sts Bot added source/otlp OTLP source. decoders/otlp and removed transform/apm-stats APM Stats transform. labels Oct 1, 2026
@webern webern changed the title feat(otlp): apply APM_SEMANTIC_CORE_DD to the semantic registry feat(otlp): decode APM_SEMANTIC_CORE_DD updates Oct 1, 2026
Add the APM_SEMANTIC_CORE_DD product decoder and let
SemanticRegistryProvider subscribe through the Remote Configuration
client. Export the provider for callers that build the trace pipeline.

Each configuration replaces the whole registry. Select the last valid
configuration in ascending ID order, warn about multiple assignments and
report unsupported entries that were skipped during parsing. Log the
selected registry once per accepted update rather than in each consumer.

An empty assignment restores the embedded registry. Reject an assignment
with no valid configuration so providers retain the last accepted
registry. Errors reported to the Agent do not include payload contents.

Test replacement, removal, invalid assignments and diagnostics through
the decoder. Exercise the OTLP source and decoder builder paths to
verify that their translators receive the configured provider. Startup
subscription wiring is added separately.
@webern webern changed the title feat(otlp): decode APM_SEMANTIC_CORE_DD updates feat(otlp): traces semantic registry remote config decoder Oct 2, 2026
@webern
webern marked this pull request as ready for review October 2, 2026 14:25
@webern
webern requested a review from a team as a code owner October 2, 2026 14:25

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The decoder correctly handles registry replacement, removal, partial rejection, deterministic selection, and retention of the last accepted registry.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit f49a2a4 · @DataDog review to ask questions

@webern webern changed the title feat(otlp): traces semantic registry remote config decoder feat(otlp): decode trace semantic core registry updates Oct 2, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/components Sources, transforms, and destinations. changelog/no-changelog No changelog entry needed decoders/otlp source/otlp OTLP source.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant