Skip to content

chore(config): drop orphan metrics_level from typed model - #1999

Closed
webern wants to merge 1 commit into
m/pr6-adp-cutoverfrom
m/rm-metrics-level
Closed

chore(config): drop orphan metrics_level from typed model#1999
webern wants to merge 1 commit into
m/pr6-adp-cutoverfrom
m/rm-metrics-level

Conversation

@webern

@webern webern commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Human Summary

TODO: human writes here

AI Summary

metrics_level is a bootstrap-phase Saluki-only key. It is read raw from the
bootstrap GenericConfiguration in main() to set the internal-telemetry
verbosity before the ConfigurationSystem is constructed, so the typed model
is never in play at its only call site.

The typed model nonetheless carried SharedConfiguration::metrics_level,
seeded from SalukiOnly::metrics_level — but nothing ever read it. It was an
orphan field duplicating the real bootstrap read.

This removes the orphan SharedConfiguration::metrics_level field, the
SalukiOnly::metrics_level field and its seed line, and the associated
round-trip test coverage. The bootstrap raw read in main.rs is unchanged and
remains the sole consumer.

Change Type

  • Non-functional (chore, refactoring, docs)

How did you test this PR?

make build-schema-overlay (no drift), make fmt, make check-all,
make check-docs, and targeted cargo nextest run -p agent-data-plane-config-system -p agent-data-plane-config (55 passed).

References

`metrics_level` is a bootstrap-phase Saluki-only key: it is read raw from
the bootstrap `GenericConfiguration` in `main()` to configure the metrics
subsystem before the `ConfigurationSystem` exists. The typed model carried
`shared.metrics_level` (seeded from `SalukiOnly.metrics_level`), but nothing
ever read it -- an orphan field that duplicated the real bootstrap read.

Remove the orphan `SharedConfiguration::metrics_level` field, the
`SalukiOnly::metrics_level` field and its `seed` line, and the associated
round-trip test coverage. The bootstrap raw read in `main.rs` is unchanged
and remains the single consumer.
Copilot AI review requested due to automatic review settings July 5, 2026 19:58
@webern
webern requested a review from a team as a code owner July 5, 2026 19:58

Copilot AI 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.

Pull request overview

Removes an unused metrics_level field from the typed configuration model, aligning the config system with actual runtime behavior where metrics_level is only consumed during bootstrap via raw GenericConfiguration parsing in bin/agent-data-plane.

Changes:

  • Dropped SharedConfiguration::metrics_level from the typed model.
  • Dropped SalukiOnly::metrics_level plus its seeding logic into the typed model.
  • Removed the corresponding round-trip transport assertions from SalukiOnly tests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/agent-data-plane-config/src/shared.rs Removes orphan SharedConfiguration::metrics_level field from the typed config model.
lib/agent-data-plane-config-system/src/saluki_only.rs Removes metrics_level from Saluki-only deserialization/seeding and updates the transport test accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@datadog-prod-us1-5

This comment has been minimized.

@pr-commenter

pr-commenter Bot commented Jul 5, 2026

Copy link
Copy Markdown

Binary Size Analysis (Agent Data Plane)

Baseline: 7b98c6f · Comparison: bd740ec · diff
Analysis Configuration: stripped binaries · Pass/Fail Threshold: +5%
Sizes: 41.63 MiB (baseline) vs 41.69 MiB (comparison)
Size Change: +56.85 KiB (+0.13%)

✅ Binary size difference within threshold

Changes by Module
Module File Size Symbols
figment -617.20 KiB 377
serde_json +243.50 KiB 511
datadog_agent_config::generated::datadog_configuration +148.34 KiB 45
core +140.24 KiB 9321
tracing -116.85 KiB 98
resource_accounting::groups::Tracked +95.84 KiB 29
serde -72.26 KiB 67
agent_data_plane_config_system::saluki_env_overlay::PathRecorder +66.75 KiB 24
prost +46.28 KiB 274
tokio +45.58 KiB 3228
serde_with -43.17 KiB 27
saluki_components::common::datadog -41.12 KiB 529
saluki_components::sources::dogstatsd -40.12 KiB 368
agent_data_plane_config_system::translators::datadog_translator +31.38 KiB 25
hyper_util +29.10 KiB 39
agent_data_plane_config::SalukiConfiguration +28.34 KiB 1
axum +26.15 KiB 333
tonic -26.03 KiB 358
otlp_protos::otlp_include::opentelemetry -25.96 KiB 143
alloc +24.14 KiB 1465
Detailed Symbol Changes
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [NEW] +88.6Ki  [NEW] +88.2Ki    _<datadog_agent_config::generated::datadog_configuration::_::<impl serde_core::de::Deserialize for datadog_agent_config::generated::datadog_configuration::DatadogConfiguration>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::h59abc0a47db21533
  [NEW] +55.3Ki  [NEW] +55.2Ki    saluki_components::common::datadog::io::run_endpoint_io_loop::_{{closure}}::h619cfc6f7a2c29a2
  [NEW] +53.2Ki  [NEW] +53.1Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::h329f79117c30c586
  [NEW] +40.9Ki  [NEW] +40.7Ki    _<saluki_components::forwarders::otlp::OtlpForwarder as saluki_core::components::forwarders::Forwarder>::run::_{{closure}}::h12001b40cfdbe9ad
  [NEW] +36.6Ki  [NEW] +36.4Ki    _<saluki_components::transforms::apm_stats::ApmStats as saluki_core::components::transforms::Transform>::run::_{{closure}}::hcfbaff7c8f04ca3a
  [NEW] +32.5Ki  [NEW] +32.3Ki    _<saluki_components::transforms::aggregate::Aggregate as saluki_core::components::transforms::Transform>::run::_{{closure}}::ha1b37f98738ba368
  [NEW] +32.1Ki  [NEW] +31.9Ki    saluki_components::sources::otlp::metrics::translator::OtlpMetricsTranslator::translate_metrics::h6f16bec49aa3e135
  [NEW] +31.8Ki  [NEW] +31.6Ki    agent_data_plane::internal::env::workload::RemoteAgentWorkloadProvider::from_configuration::_{{closure}}::hc1ab1506e0ba4151
  [NEW] +29.7Ki  [NEW] +29.6Ki    agent_data_plane::cli::dogstatsd::handle_dogstatsd_command::_{{closure}}::hd2948b2b886d3024
  [NEW] +28.3Ki  [NEW] +28.2Ki    _<agent_data_plane_config::SalukiConfiguration as core::clone::Clone>::clone::h8de0a5256ebf7df6
  [NEW] +26.4Ki  [NEW] +26.3Ki    saluki_components::sources::dogstatsd::drive_stream::_{{closure}}::h16dece6451b89a07
  [NEW] +26.4Ki  [NEW] +26.3Ki    agent_data_plane::cli::run::create_topology::_{{closure}}::h7b42595e5eb142f8
  [DEL] -26.6Ki  [DEL] -26.4Ki    _<saluki_components::sources::dogstatsd::DogStatsDConfiguration as saluki_core::components::sources::builder::SourceBuilder>::build::_{{closure}}::h2c2a33d551977c6d
  [DEL] -27.2Ki  [DEL] -26.9Ki    _<saluki_components::sources::dogstatsd::_::<impl serde_core::de::Deserialize for saluki_components::sources::dogstatsd::DogStatsDConfiguration>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::hfc578ba92a99992a
  [DEL] -28.6Ki  [DEL] -28.5Ki    saluki_components::sources::otlp::metrics::translator::OtlpMetricsTranslator::translate_metrics::h1e8351a6f731e9df
  [DEL] -28.6Ki  [DEL] -28.5Ki    agent_data_plane::cli::dogstatsd::handle_dogstatsd_command::_{{closure}}::h84db3f7ad161eab2
  [DEL] -32.6Ki  [DEL] -32.4Ki    _<saluki_components::transforms::aggregate::Aggregate as saluki_core::components::transforms::Transform>::run::_{{closure}}::h72e4b09fd816d94f
  [DEL] -38.7Ki  [DEL] -38.5Ki    _<saluki_components::forwarders::otlp::OtlpForwarder as saluki_core::components::forwarders::Forwarder>::run::_{{closure}}::h3cd6ee67f0471508
  [DEL] -44.7Ki  [DEL] -44.6Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::h83501a7881036c5f
  [DEL] -56.8Ki  [DEL] -56.6Ki    saluki_components::common::datadog::io::run_endpoint_io_loop::_{{closure}}::h54fbb73bb30184e6
  -0.9%  -141Ki  -1.9%  -225Ki    [33603 Others]
  +0.1% +56.9Ki  -0.1% -28.1Ki    TOTAL

@pr-commenter

pr-commenter Bot commented Jul 5, 2026

Copy link
Copy Markdown

Regression Detector (Agent Data Plane)

Run ID: 7917fd2d-01b2-41f5-aaf9-4b3f4e80ea43
Baseline: 7b98c6f1 · Comparison: bd740ec3 · 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_low memory ⚪ +1.10 metrics profiles logs
quality_gates_rss_idle memory ⚪ +0.84 metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory ⚪ +0.38 metrics profiles logs
quality_gates_rss_dsd_medium memory ⚪ +0.31 metrics profiles logs
quality_gates_rss_dsd_heavy memory ⚪ -0.03 metrics profiles logs
Bounds Checks: ✅ Passed (5)
experiment check replicates observed links
quality_gates_rss_dsd_heavy memory_usage 10/10 ✅ 139 MiB ≤ 140 MiB metrics profiles logs
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 43.5 MiB ≤ 50 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 64.9 MiB ≤ 75 MiB metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 ✅ 191 MiB ≤ 200 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 29.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.

@webern

webern commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

It doesn't seem important to delete this.

@webern webern closed this Jul 6, 2026
@webern
webern deleted the m/rm-metrics-level branch July 17, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants