update ECS fargate collector to use v4 endpoint#23253
update ECS fargate collector to use v4 endpoint#23253dd-mergequeue[bot] merged 11 commits intomainfrom
Conversation
6680e26 to
975bac6
Compare
975bac6 to
b15bc95
Compare
Bloop Bleep... Dogbot HereRegression Detector ResultsRun ID: 7d872c5d-5368-4a56-944c-f56428a08997 Performance changes are noted in the perf column of each table:
No significant changes in experiment optimization goalsConfidence level: 90.00% There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.
|
| perf | experiment | goal | Δ mean % | Δ mean % CI |
|---|---|---|---|---|
| ➖ | file_to_blackhole | % cpu utilization | -1.36 | [-7.63, +4.92] |
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI |
|---|---|---|---|---|
| ➖ | file_tree | memory utilization | +1.17 | [+1.05, +1.29] |
| ➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | +0.93 | [-1.94, +3.80] |
| ➖ | basic_py_check | % cpu utilization | +0.92 | [-1.50, +3.34] |
| ➖ | otel_to_otel_logs | ingress throughput | +0.03 | [-0.61, +0.66] |
| ➖ | trace_agent_msgpack | ingress throughput | +0.00 | [-0.00, +0.00] |
| ➖ | uds_dogstatsd_to_api | ingress throughput | -0.00 | [-0.06, +0.06] |
| ➖ | trace_agent_json | ingress throughput | -0.00 | [-0.01, +0.01] |
| ➖ | tcp_dd_logs_filter_exclude | ingress throughput | -0.00 | [-0.05, +0.05] |
| ➖ | pycheck_1000_100byte_tags | % cpu utilization | -0.25 | [-5.19, +4.69] |
| ➖ | tcp_syslog_to_blackhole | ingress throughput | -0.32 | [-0.40, -0.24] |
| ➖ | process_agent_standard_check_with_stats | memory utilization | -0.50 | [-0.54, -0.46] |
| ➖ | process_agent_standard_check | memory utilization | -0.52 | [-0.57, -0.48] |
| ➖ | idle | memory utilization | -1.01 | [-1.05, -0.97] |
| ➖ | process_agent_real_time_mode | memory utilization | -1.02 | [-1.06, -0.98] |
| ➖ | file_to_blackhole | % cpu utilization | -1.36 | [-7.63, +4.92] |
Explanation
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:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
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.
-
Its configuration does not mark it "erratic".
8d02b6a to
09f57df
Compare
b15bc95 to
ae81e64
Compare
ae81e64 to
e7cfc51
Compare
e7cfc51 to
f2f8373
Compare
Test changes on VMUse this command from test-infra-definitions to manually test this PR changes on a VM: inv create-vm --pipeline-id=32510944 --os-family=ubuntu |
Regression DetectorRegression Detector ResultsRun ID: e1c20b57-dd8b-4d1c-968f-fd12b125818c Performance changes are noted in the perf column of each table:
No significant changes in experiment optimization goalsConfidence level: 90.00% There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.
|
| perf | experiment | goal | Δ mean % | Δ mean % CI |
|---|---|---|---|---|
| ➖ | file_to_blackhole | % cpu utilization | -1.24 | [-6.79, +4.31] |
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI |
|---|---|---|---|---|
| ➖ | process_agent_real_time_mode | memory utilization | +1.09 | [+1.04, +1.13] |
| ➖ | tcp_syslog_to_blackhole | ingress throughput | +0.67 | [+0.58, +0.76] |
| ➖ | basic_py_check | % cpu utilization | +0.42 | [-1.97, +2.81] |
| ➖ | process_agent_standard_check_with_stats | memory utilization | +0.23 | [+0.17, +0.29] |
| ➖ | otel_to_otel_logs | ingress throughput | +0.02 | [-0.40, +0.44] |
| ➖ | trace_agent_msgpack | ingress throughput | +0.02 | [+0.01, +0.03] |
| ➖ | trace_agent_json | ingress throughput | +0.01 | [-0.00, +0.03] |
| ➖ | file_tree | memory utilization | -0.00 | [-0.13, +0.12] |
| ➖ | tcp_dd_logs_filter_exclude | ingress throughput | -0.01 | [-0.05, +0.03] |
| ➖ | uds_dogstatsd_to_api | ingress throughput | -0.03 | [-0.24, +0.18] |
| ➖ | idle | memory utilization | -0.55 | [-0.60, -0.51] |
| ➖ | process_agent_standard_check | memory utilization | -0.61 | [-0.68, -0.55] |
| ➖ | pycheck_1000_100byte_tags | % cpu utilization | -1.06 | [-5.90, +3.79] |
| ➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | -1.08 | [-4.02, +1.86] |
| ➖ | file_to_blackhole | % cpu utilization | -1.24 | [-6.79, +4.31] |
Explanation
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:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
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.
-
Its configuration does not mark it "erratic".
f2f8373 to
8ebf82c
Compare
8ebf82c to
b181131
Compare
b181131 to
3ea06d6
Compare
| Name: taskID, | ||
| }, | ||
| ClusterName: parseClusterName(task.ClusterName), | ||
| Region: parseRegion(task.ClusterName), |
There was a problem hiding this comment.
nit
I know this was not introduced in your PR, but mentioning it in case you have time to improve things a bit.
you can already use the AWS public go sdk to get the region instead of manually parsing the ARN.
There was a problem hiding this comment.
I think importing sdk will increase the pkg size and the binary size test can fail
|
|
||
| // the AvailabilityZone metadata is only available for | ||
| // Fargate tasks using platform version 1.4 or later | ||
| AvailabilityZone: task.AvailabilityZone, |
There was a problem hiding this comment.
What happens here if we are using a platform with version older than 1.4? Does this return an empty string in that case?
There was a problem hiding this comment.
It would be empty as it's our current behaviour https://github.com/DataDog/datadog-agent/blob/main/comp/core/workloadmeta/collectors/internal/ecsfargate/ecsfargate.go#L122
| t.Errorf("unexpected entity type: %T", entity) | ||
| } | ||
| } | ||
| require.Equal(t, 4, count) |
There was a problem hiding this comment.
It seems like your tests only include ecs task events, but no container events. is there any reason for this?
There was a problem hiding this comment.
It tests both 2 events
| require.Equal(t, "ecs-cluster", entity.ClusterName) | ||
| require.Equal(t, "my-redis", entity.Family) | ||
| require.Equal(t, "1", entity.Version) | ||
| require.Equal(t, workloadmeta.ECSLaunchTypeFargate, entity.LaunchType) |
There was a problem hiding this comment.
Why aren't we asserting the Containers field?
| require.Equal(t, "RUNNING", entity.KnownStatus) | ||
| require.Equal(t, "awslogs", entity.LogDriver) | ||
| require.Len(t, entity.Networks, 1) | ||
| require.Equal(t, "awsvpc", entity.Networks[0].NetworkMode) |
There was a problem hiding this comment.
why didn't we assert these for the case of v2?
|
/merge |
|
🚂 MergeQueue Pull request added to the queue. This build is going to start soon! (estimated merge in less than 25m) Use |
This reverts commit 808c008.
* update ECS collector to use v4 endpoint * address feedback * address feedback * update ECS fargate collector to use v4 endpoint * address feedback * address feedback * address feedback
What does this PR do?
This PR is based on #21836. It updates ECS Fargate Collector to use v4 endpoint is feature flag is true. We can set this feature flag to true in future so we can fully depend on version detection
datadog-agent/comp/core/workloadmeta/collectors/internal/ecsfargate/ecsfargate.go
Lines 80 to 87 in 1b10170
Motivation
Additional Notes
Possible Drawbacks / Trade-offs
Describe how to test/QA your changes