Skip to content

Conversation

@erikayasuda
Copy link
Contributor

@erikayasuda erikayasuda commented Feb 10, 2026

What does this PR do?

Adds two new configuration values to support tag-based gradual rollout:

  • admission_controller.auto_instrumentation.gradual_rollout.enabled (default: true)
    • If set to false, will not attempt any image resolution at all (hence, gradual rollout will be disabled)
  • admission_controller.auto_instrumentation.gradual_rollout.cache_ttl_hours (default: 1)

Motivation

The motivation of adding these configuration values is to:

  1. Provide a universal "switch" for enabling/disabling gradual rollout in the case we need to disable it. This would be in the form of setting the default value of admission_controller.auto_instrumentation.gradual_rollout.enabled to false, and cutting a new patch release. As we move away from the remote configuration implementation of gradual rollout, this is the closest we can get to "turning off" gradual rollout from our end.
  2. Adding the ability to configure the cache TTL for imageresolver.cache, in the case that the default value we provide is not appropriate for a specific customer.

Describe how you validated your changes

Updated unit tests, local E2E testing with injector-dev.

Additional Notes

@erikayasuda erikayasuda changed the title [APMLP-876] Add configurations for imageresolver.cache TTL and enable/disable gradual rollout [APMLP-876] Add config variables for imageresolver.cache TTL and enable/disable gradual rollout Feb 10, 2026
@dd-octo-sts dd-octo-sts bot added the internal Identify a non-fork PR label Feb 10, 2026
@github-actions github-actions bot added the medium review PR review might take time label Feb 10, 2026
@agent-platform-auto-pr
Copy link
Contributor

Static quality checks

✅ Please find below the results from static quality gates
Comparison made with ancestor bb35fe3
📊 Static Quality Gates Dashboard

Successful checks

Info

Quality gate Change Size (prev → curr → max)
agent_msi +3.0 KiB (0.00% increase) 663.020 → 663.023 → 1072.620
agent_rpm_arm64_fips +3.41 KiB (0.00% increase) 695.441 → 695.444 → 698.930
agent_suse_arm64_fips +3.41 KiB (0.00% increase) 695.441 → 695.444 → 698.930
28 successful checks with minimal change (< 2 KiB)
Quality gate Current Size
agent_deb_amd64 754.414 MiB
agent_deb_amd64_fips 714.528 MiB
agent_heroku_amd64 324.200 MiB
agent_rpm_amd64 754.398 MiB
agent_rpm_amd64_fips 714.512 MiB
agent_rpm_arm64 732.873 MiB
agent_suse_amd64 754.398 MiB
agent_suse_amd64_fips 714.512 MiB
agent_suse_arm64 732.873 MiB
docker_agent_amd64 815.471 MiB
docker_agent_arm64 818.650 MiB
docker_agent_jmx_amd64 1006.382 MiB
docker_agent_jmx_arm64 998.344 MiB
docker_cluster_agent_amd64 180.956 MiB
docker_cluster_agent_arm64 196.809 MiB
docker_cws_instrumentation_amd64 7.135 MiB
docker_cws_instrumentation_arm64 6.689 MiB
docker_dogstatsd_amd64 38.449 MiB
docker_dogstatsd_arm64 36.749 MiB
dogstatsd_deb_amd64 29.669 MiB
dogstatsd_deb_arm64 27.833 MiB
dogstatsd_rpm_amd64 29.669 MiB
dogstatsd_suse_amd64 29.669 MiB
iot_agent_deb_amd64 42.818 MiB
iot_agent_deb_arm64 39.935 MiB
iot_agent_deb_armhf 40.505 MiB
iot_agent_rpm_amd64 42.818 MiB
iot_agent_suse_amd64 42.818 MiB
On-wire sizes (compressed)
Quality gate Change Size (prev → curr → max)
agent_deb_amd64 +10.59 KiB (0.01% increase) 184.398 → 184.409 → 184.810
agent_deb_amd64_fips -2.59 KiB (0.00% reduction) 176.286 → 176.283 → 177.560
agent_heroku_amd64 -11.42 KiB (0.01% reduction) 87.116 → 87.105 → 88.450
agent_msi +12.0 KiB (0.01% increase) 143.246 → 143.258 → 143.300
agent_rpm_amd64 +46.99 KiB (0.02% increase) 186.719 → 186.765 → 188.160
agent_rpm_amd64_fips +18.19 KiB (0.01% increase) 178.254 → 178.272 → 178.900
agent_rpm_arm64 -34.88 KiB (0.02% reduction) 169.020 → 168.986 → 169.930
agent_rpm_arm64_fips +53.22 KiB (0.03% increase) 162.289 → 162.341 → 163.120
agent_suse_amd64 +46.99 KiB (0.02% increase) 186.719 → 186.765 → 188.160
agent_suse_amd64_fips +18.19 KiB (0.01% increase) 178.254 → 178.272 → 178.900
agent_suse_arm64 -34.88 KiB (0.02% reduction) 169.020 → 168.986 → 169.930
agent_suse_arm64_fips +53.22 KiB (0.03% increase) 162.289 → 162.341 → 163.120
docker_agent_amd64 -3.5 KiB (0.00% reduction) 276.992 → 276.988 → 277.400
docker_agent_arm64 +9.67 KiB (0.00% increase) 264.375 → 264.385 → 266.040
docker_agent_jmx_amd64 -2.24 KiB (0.00% reduction) 345.632 → 345.629 → 346.020
docker_agent_jmx_arm64 +5.21 KiB (0.00% increase) 328.997 → 329.002 → 330.660
docker_cluster_agent_amd64 neutral 63.903 MiB → 64.510
docker_cluster_agent_arm64 -3.51 KiB (0.01% reduction) 60.181 → 60.177 → 61.170
docker_cws_instrumentation_amd64 neutral 2.994 MiB → 3.330
docker_cws_instrumentation_arm64 neutral 2.726 MiB → 3.090
docker_dogstatsd_amd64 neutral 14.876 MiB → 15.820
docker_dogstatsd_arm64 +2.44 KiB (0.02% increase) 14.215 → 14.217 → 14.830
dogstatsd_deb_amd64 neutral 7.839 MiB → 8.790
dogstatsd_deb_arm64 neutral 6.726 MiB → 7.710
dogstatsd_rpm_amd64 neutral 7.849 MiB → 8.800
dogstatsd_suse_amd64 neutral 7.849 MiB → 8.800
iot_agent_deb_amd64 neutral 11.234 MiB → 12.040
iot_agent_deb_arm64 neutral 9.601 MiB → 10.450
iot_agent_deb_armhf neutral 9.801 MiB → 10.620
iot_agent_rpm_amd64 -2.0 KiB (0.02% reduction) 11.254 → 11.252 → 12.060
iot_agent_suse_amd64 -2.0 KiB (0.02% reduction) 11.254 → 11.252 → 12.060

@cit-pr-commenter-54b7da
Copy link

cit-pr-commenter-54b7da bot commented Feb 10, 2026

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: 80c3c627-3953-41f5-bd4c-f4dd7d35186e

Baseline: 0134072
Comparison: 59c606d
Diff

Optimization Goals: ✅ No significant changes detected

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI trials links
docker_containers_cpu % cpu utilization +0.41 [-2.78, +3.60] 1 Logs

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
ddot_logs memory utilization +1.04 [+0.97, +1.11] 1 Logs
quality_gate_metrics_logs memory utilization +0.98 [+0.77, +1.19] 1 Logs bounds checks dashboard
tcp_syslog_to_blackhole ingress throughput +0.67 [+0.61, +0.74] 1 Logs
quality_gate_idle memory utilization +0.45 [+0.41, +0.50] 1 Logs bounds checks dashboard
docker_containers_cpu % cpu utilization +0.41 [-2.78, +3.60] 1 Logs
ddot_metrics memory utilization +0.19 [-0.02, +0.40] 1 Logs
ddot_metrics_sum_delta memory utilization +0.12 [-0.09, +0.33] 1 Logs
file_to_blackhole_0ms_latency egress throughput +0.06 [-0.41, +0.54] 1 Logs
otlp_ingest_metrics memory utilization +0.06 [-0.10, +0.22] 1 Logs
file_to_blackhole_100ms_latency egress throughput +0.04 [-0.00, +0.09] 1 Logs
uds_dogstatsd_20mb_12k_contexts_20_senders memory utilization +0.03 [-0.02, +0.08] 1 Logs
ddot_metrics_sum_cumulative memory utilization +0.02 [-0.14, +0.17] 1 Logs
uds_dogstatsd_to_api ingress throughput +0.00 [-0.12, +0.13] 1 Logs
uds_dogstatsd_to_api_v3 ingress throughput +0.00 [-0.12, +0.13] 1 Logs
file_to_blackhole_1000ms_latency egress throughput -0.00 [-0.42, +0.41] 1 Logs
file_to_blackhole_500ms_latency egress throughput -0.01 [-0.40, +0.38] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput -0.01 [-0.09, +0.08] 1 Logs
quality_gate_idle_all_features memory utilization -0.11 [-0.14, -0.07] 1 Logs bounds checks dashboard
file_tree memory utilization -0.15 [-0.20, -0.10] 1 Logs
ddot_metrics_sum_cumulativetodelta_exporter memory utilization -0.27 [-0.50, -0.04] 1 Logs
docker_containers_memory memory utilization -0.57 [-0.65, -0.49] 1 Logs
otlp_ingest_logs memory utilization -0.74 [-0.85, -0.63] 1 Logs
quality_gate_logs % cpu utilization -1.32 [-2.83, +0.19] 1 Logs bounds checks dashboard

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed links
docker_containers_cpu simple_check_run 10/10
docker_containers_memory memory_usage 10/10
docker_containers_memory simple_check_run 10/10
file_to_blackhole_0ms_latency lost_bytes 10/10
file_to_blackhole_0ms_latency memory_usage 10/10
file_to_blackhole_1000ms_latency lost_bytes 10/10
file_to_blackhole_1000ms_latency memory_usage 10/10
file_to_blackhole_100ms_latency lost_bytes 10/10
file_to_blackhole_100ms_latency memory_usage 10/10
file_to_blackhole_500ms_latency lost_bytes 10/10
file_to_blackhole_500ms_latency memory_usage 10/10
quality_gate_idle intake_connections 10/10 bounds checks dashboard
quality_gate_idle memory_usage 10/10 bounds checks dashboard
quality_gate_idle_all_features intake_connections 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 bounds checks dashboard
quality_gate_logs intake_connections 10/10 bounds checks dashboard
quality_gate_logs lost_bytes 10/10 bounds checks dashboard
quality_gate_logs memory_usage 10/10 bounds checks dashboard
quality_gate_metrics_logs cpu_usage 10/10 bounds checks dashboard
quality_gate_metrics_logs intake_connections 10/10 bounds checks dashboard
quality_gate_metrics_logs lost_bytes 10/10 bounds checks dashboard
quality_gate_metrics_logs memory_usage 10/10 bounds checks dashboard

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

CI Pass/Fail Decision

Passed. All Quality Gates passed.

  • quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.

defer r.mu.RUnlock()

if len(r.imageMappings) == 0 {
log.Debugf("Cache empty, no resolution available")
Copy link
Contributor Author

@erikayasuda erikayasuda Feb 10, 2026

Choose a reason for hiding this comment

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

This is so disruptive in reading the failed test logs, I can only imagine it's just as disruptive for real services. Removing 😅

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair - this seems like valid/ "expected" behavior so probably no need to report it.

@erikayasuda erikayasuda added the qa/done QA done before merge and regressions are covered by tests label Feb 10, 2026
@erikayasuda erikayasuda marked this pull request as ready for review February 10, 2026 20:44
@erikayasuda erikayasuda requested review from a team as code owners February 10, 2026 20:44
@erikayasuda erikayasuda requested a review from s-alad February 10, 2026 20:44
Copy link
Contributor

@gabedos gabedos left a comment

Choose a reason for hiding this comment

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

Using config options for imageresolver cache lgtm

@maycmlee maycmlee self-assigned this Feb 10, 2026
Copy link
Contributor

@maycmlee maycmlee left a comment

Choose a reason for hiding this comment

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

Couple of small edits, but approving to not block merge.

Co-authored-by: May Lee <may.lee@datadoghq.com>
Copy link
Contributor

@mtoffl01 mtoffl01 left a comment

Choose a reason for hiding this comment

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

LGTM

defer r.mu.RUnlock()

if len(r.imageMappings) == 0 {
log.Debugf("Cache empty, no resolution available")
Copy link
Contributor

Choose a reason for hiding this comment

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

Fair - this seems like valid/ "expected" behavior so probably no need to report it.

return NewNoOpResolver()
}
if cfg.RCClient == nil || reflect.ValueOf(cfg.RCClient).IsNil() {
log.Debugf("No remote config client available")
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Not directly related to these changes, but would be nice to get more specific (about the impact) on this log as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah spoiler alert... I'm going to remove all of this remote config based code in a subsequent PR 😅 So it'll go away in a bit

InitRetryDelay: 1 * time.Second,
BucketID: calculateRolloutBucket(cfg.GetString("api_key")),
DigestCacheTTL: 1 * time.Hour, // DEV: Make this configurable
DigestCacheTTL: cfg.GetDuration("admission_controller.auto_instrumentation.gradual_rollout.cache_ttl_hours") * time.Hour,
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure you want to lock in to hours here? Is there a case where a user might want a finer grained window?

Before these changes, DigestCacheTTL was just of type time.Duration; with these changes, it will always be on the order of hours.

If it's unlikely a user will care, leave as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah good call out. I just specified this as hours so it was human-readable when you configured it 🤔 I figured setting a TTL by minutes wouldn't be a very common use case...?

@maycmlee maycmlee removed their assignment Feb 10, 2026
@erikayasuda
Copy link
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351
Copy link

gh-worker-devflow-routing-ef8351 bot commented Feb 10, 2026

View all feedbacks in Devflow UI.

2026-02-10 22:28:33 UTC ℹ️ Start processing command /merge
Use /merge -c to cancel this operation!


2026-02-10 22:28:40 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.

Use /merge -c to cancel this operation!


⏳ Processing

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

Labels

internal Identify a non-fork PR medium review PR review might take time qa/done QA done before merge and regressions are covered by tests team/agent-configuration team/container-platform The Container Platform Team team/injection-platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants