Skip to content

chore(config): migrate APM stats encoder to typed configuration - #2266

Merged
webern merged 1 commit into
mainfrom
m/confra-aencd
Aug 10, 2026
Merged

chore(config): migrate APM stats encoder to typed configuration#2266
webern merged 1 commit into
mainfrom
m/confra-aencd

Conversation

@webern

@webern webern commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrate the Datadog APM Stats encoder to typed traces and shared configuration. The encoder now receives the resolved environment and flush timeout directly, while raw deserialization and legacy smoke-test ownership are removed.

Change Type

  • Non-functional (chore, refactoring, docs)

How did you test this PR?

  • make fmt
  • make check-docs
  • make check-clippy
  • make check-all
  • cargo check -p saluki-components -p agent-data-plane -p datadog-agent-config-overlay-model --tests

References

@pr-commenter

pr-commenter Bot commented Aug 5, 2026

Copy link
Copy Markdown

Binary Size Analysis (Agent Data Plane)

Baseline: c07a446 · Comparison: 1abf698 · diff
Analysis Configuration: stripped binaries · Pass/Fail Threshold: +5%
Sizes: 41.39 MiB (baseline) vs 41.31 MiB (comparison)
Size Change: -85.77 KiB (-0.20%)

✅ Binary size difference within threshold

Changes by Module
Module File Size Symbols
figment -138.30 KiB 80
core +46.10 KiB 1871
saluki_components::common::datadog +33.49 KiB 63
serde -20.54 KiB 27
anon.9f7fcabd42bdb20c281b9db2ecef43c6.574.llvm.17066318201269722550 +17.62 KiB 1
anon.d25442021e55207a1dc52a0783b8a331.602.llvm.11360328729134350799 -17.61 KiB 1
prost +14.35 KiB 225
piecemeal -14.31 KiB 18
anon.9f7fcabd42bdb20c281b9db2ecef43c6.687.llvm.17066318201269722550 +12.37 KiB 1
anon.d25442021e55207a1dc52a0783b8a331.713.llvm.11360328729134350799 -12.37 KiB 1
tonic +10.41 KiB 61
agent_data_plane_config::_::_<impl serde_core +10.12 KiB 1
anon.d25442021e55207a1dc52a0783b8a331.146.llvm.11360328729134350799 -9.71 KiB 1
quick_cache -9.63 KiB 19
anon.9f7fcabd42bdb20c281b9db2ecef43c6.145.llvm.17066318201269722550 +9.62 KiB 1
std +9.55 KiB 67
otlp_protos::otlp_include::opentelemetry -9.15 KiB 124
anon.d25442021e55207a1dc52a0783b8a331.599.llvm.11360328729134350799 -9.15 KiB 1
anon.9f7fcabd42bdb20c281b9db2ecef43c6.571.llvm.17066318201269722550 +9.06 KiB 1
anon.9f7fcabd42bdb20c281b9db2ecef43c6.28.llvm.17066318201269722550 +9.01 KiB 1
Detailed Symbol Changes
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +1.1% +99.2Ki  +1.0% +63.9Ki    [10173 Others]
  [NEW] +37.4Ki  [NEW] +37.1Ki    _<saluki_components::common::datadog::config::_::<impl serde_core::de::Deserialize for saluki_components::common::datadog::config::ForwarderConfiguration>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::hfdfd1ef0ed851a0a
  [NEW] +17.6Ki  [NEW]     +76    anon.9f7fcabd42bdb20c281b9db2ecef43c6.574.llvm.17066318201269722550
  +248% +15.8Ki  +252% +15.8Ki    h2::proto::connection::DynConnection<B>::recv_frame::h09d92c074afb400d
  [NEW] +12.4Ki  [NEW]     +81    anon.9f7fcabd42bdb20c281b9db2ecef43c6.687.llvm.17066318201269722550
  [DEL] -10.9Ki  [DEL] -10.8Ki    saluki_components::sources::otlp::logs::transform::transform_log_record::h2af58f29efba97f7
 -55.5% -11.0Ki -56.0% -11.0Ki    _<figment::value::de::ConfiguredValueDe<I> as serde_core::de::Deserializer>::deserialize_struct::h6abd0fc21cbbc508
  [DEL] -12.1Ki  [DEL] -12.0Ki    _<figment::value::de::ConfiguredValueDe<I> as serde_core::de::Deserializer>::deserialize_struct::hffc30f6995b0d94e
 -55.2% -12.4Ki -55.6% -12.4Ki    _<figment::value::de::ConfiguredValueDe<I> as serde_core::de::Deserializer>::deserialize_struct::h70e2afbf0bb450d6
  [DEL] -12.4Ki  [DEL]     -81    anon.d25442021e55207a1dc52a0783b8a331.713.llvm.11360328729134350799
 -93.3% -14.6Ki -94.2% -14.6Ki    _<figment::value::de::ConfiguredValueDe<I> as serde_core::de::Deserializer>::deserialize_any::h9c01161bf3a4a364
 -55.6% -14.7Ki -55.9% -14.7Ki    _<figment::value::de::ConfiguredValueDe<I> as serde_core::de::Deserializer>::deserialize_struct::h620744619ca067ad
 -55.6% -14.7Ki -55.9% -14.7Ki    _<figment::value::de::ConfiguredValueDe<I> as serde_core::de::Deserializer>::deserialize_struct::ha466ba9027a7db13
  [DEL] -14.9Ki  [DEL] -14.7Ki    _<figment::value::de::ConfiguredValueDe<I> as serde_core::de::Deserializer>::deserialize_struct::hdae07b7ea010b6fb
  [DEL] -17.6Ki  [DEL]     -76    anon.d25442021e55207a1dc52a0783b8a331.602.llvm.11360328729134350799
  [DEL] -17.7Ki  [DEL] -17.5Ki    _<otlp_protos::otlp_include::opentelemetry::proto::collector::metrics::v1::ExportMetricsServiceRequest as prost::message::Message>::encode_raw::hb140c0447fb18ee8
  [DEL] -19.0Ki  [DEL] -18.9Ki    _<figment::value::de::ConfiguredValueDe<I> as serde_core::de::Deserializer>::deserialize_struct::hf32fb3e80e974af1
  [DEL] -21.1Ki  [DEL] -20.8Ki    _<otlp_protos::otlp_include::opentelemetry::proto::collector::metrics::v1::ExportMetricsServiceRequest as prost::message::Message>::encode_raw::hc9fac3147d76049d
  [DEL] -21.6Ki  [DEL] -21.5Ki    _<figment::value::de::ConfiguredValueDe<I> as serde_core::de::Deserializer>::deserialize_struct::h1be15f59da19991b
  [DEL] -24.9Ki  [DEL] -24.7Ki    _<figment::value::de::ConfiguredValueDe<I> as serde_core::de::Deserializer>::deserialize_struct::ha14640b20f74d1e4
  [DEL] -28.6Ki  [DEL] -28.4Ki    _<figment::value::de::ConfiguredValueDe<I> as serde_core::de::Deserializer>::deserialize_struct::h8152b7ae42bbdf3b
  -0.2% -85.8Ki  -0.3%  -119Ki    TOTAL

@pr-commenter

pr-commenter Bot commented Aug 5, 2026

Copy link
Copy Markdown

Regression Detector (Agent Data Plane)

Run ID: 254b15d2-e273-44d7-a90f-633ae825c9eb
Baseline: c07a4461 · Comparison: 1abf6986 · 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.35 metrics profiles logs
quality_gates_rss_dsd_low memory ⚪ -0.40 metrics profiles logs
quality_gates_rss_dsd_medium memory ⚪ -0.49 metrics profiles logs
quality_gates_rss_idle memory ⚪ -0.50 metrics profiles logs
quality_gates_rss_dsd_heavy memory ⚪ -0.87 metrics profiles logs
Bounds Checks: ✅ Passed (5)
experiment check replicates observed links
quality_gates_rss_dsd_heavy memory_usage 10/10 ✅ 227 MiB ≤ 250 MiB metrics profiles logs
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 50.9 MiB ≤ 60 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 92.7 MiB ≤ 100 MiB metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 ✅ 383 MiB ≤ 420 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 31.9 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.

@webern
webern marked this pull request as ready for review August 6, 2026 10:20
@webern
webern requested a review from a team as a code owner August 6, 2026 10:20

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Datadog Autotest: PASS

More details

The typed migration preserves the effective APM stats environment, shared flush timeout, zero-timeout 10 ms floor, and MessagePack metadata path; no diff-only behavioral regression was identified. The focused Rust tests and checks could not execute because the sandbox cannot fetch the uncached hyper-http-proxy git dependency.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 216cf33 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@webern
webern force-pushed the m/confra-astat branch 2 times, most recently from 2e72291 to 197bef2 Compare August 6, 2026 13:06
Base automatically changed from m/confra-astat to main August 10, 2026 17:35

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Datadog Autotest: PASS

More details

The typed cutover preserves peer-tag controls, fallback environments, hostname enrichment, and encoder flush timing through the existing source-to-model paths. Local behavioral execution was blocked by unavailable pinned Rust and Git dependencies, so confidence rests on direct parity inspection.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 4109999 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@webern
webern merged commit ff0b440 into main Aug 10, 2026
93 checks passed
@webern
webern deleted the m/confra-aencd branch August 10, 2026 18:02
dd-octo-sts Bot pushed a commit that referenced this pull request Aug 10, 2026
## Summary

Migrate the Datadog APM Stats encoder to typed traces and shared
configuration. The encoder now receives the resolved environment and
flush timeout directly, while raw deserialization and legacy smoke-test
ownership are removed.

## Change Type
- [x] Non-functional (chore, refactoring, docs)

## How did you test this PR?

- `make fmt`
- `make check-docs`
- `make check-clippy`
- `make check-all`
- `cargo check -p saluki-components -p agent-data-plane -p
datadog-agent-config-overlay-model --tests`

## References

- Progresses #2169
- Progresses #2193 ff0b440
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. encoder/datadog-stats Datadog APM Stats encoder.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants