-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update ECS v4 client #23248
update ECS v4 client #23248
Conversation
Bloop Bleep... Dogbot HereRegression Detector ResultsRun ID: ff9b2090-1e41-4d95-bc53-bf864f0761be Performance changes are noted in the perf column of each table:
Experiments with missing or malformed data
Usually, this warning means that there is no usable optimization goal data for that experiment, which could be a result of misconfiguration. 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 | +0.84 | [-5.72, +7.39] |
Fine details of change detection per experiment
perf | experiment | goal | Δ mean % | Δ mean % CI |
---|---|---|---|---|
➖ | file_to_blackhole | % cpu utilization | +0.84 | [-5.72, +7.39] |
➖ | process_agent_real_time_mode | memory utilization | +0.65 | [+0.60, +0.70] |
➖ | tcp_syslog_to_blackhole | ingress throughput | +0.41 | [+0.36, +0.47] |
➖ | process_agent_standard_check_with_stats | memory utilization | +0.28 | [+0.23, +0.32] |
➖ | trace_agent_msgpack | ingress throughput | +0.01 | [-0.00, +0.02] |
➖ | tcp_dd_logs_filter_exclude | ingress throughput | +0.00 | [-0.00, +0.00] |
➖ | uds_dogstatsd_to_api | ingress throughput | +0.00 | [-0.00, +0.00] |
➖ | trace_agent_json | ingress throughput | -0.02 | [-0.04, +0.00] |
➖ | process_agent_standard_check | memory utilization | -0.15 | [-0.19, -0.10] |
➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | -0.23 | [-1.65, +1.19] |
➖ | otel_to_otel_logs | ingress throughput | -0.59 | [-1.24, +0.06] |
➖ | idle | memory utilization | -0.80 | [-0.84, -0.75] |
➖ | file_tree | memory utilization | -1.11 | [-1.22, -1.00] |
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".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is an issue with the fact that V4FromCurrentTask(…)
uses the same globalUtil.initV3orV4
sync.Once
object as V3orV4FromCurrentTask(…)
.
If both functions are called, only one of the two will be allowed to setup its retrier.
The other will panic when calling TriggerRetry
.
pkg/util/ecs/metadata/clients.go
Outdated
globalUtil.initV3orV4.Do(func() { | ||
globalUtil.initRetryV4.SetupRetrier(&retry.Config{ //nolint:errcheck | ||
Name: "ecsutil-meta-v4", | ||
AttemptMethod: initV4, | ||
Strategy: retry.Backoff, | ||
InitialRetryDelay: initialRetryDelay, | ||
MaxRetryDelay: maxRetryDelay, | ||
}) | ||
}) | ||
if err := globalUtil.initRetryV4.TriggerRetry(); err != nil { | ||
log.Debugf("ECS metadata v4 client init error: %s", err) | ||
return nil, err | ||
} | ||
return globalUtil.v3or4, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m wondering if reusing the same v3or4
field of globalUtil
could be problematic.
Let’s consider the following scenario:
- A legacy piece of code calls
V3orV4FromCurrentTask()
.V3orV4FromCurrentTask()
runs theglobalUtil.initV3orV4
sync.Once
function and setups theglobalUtil.initRetryV3orV4
retrier with theinitV3orV4
function.V3orV4FromCurrentTask()
then callsglobalUtil.initRetryV3orV4.TriggerRetry()
which callsinitV3orV3
and setsglobalUtil.v3or4
with a V3 client.
Then,
- Another piece of code calls
V4FromCurrentTask()
.V4FromCurrentTask()
callsglobalUtil.initV3orV4.Do(…)
butinitV3orV4
has already been invoked. So, the anonymous function isn’t called andglobalUtil.initRetryV4.SetupRetrier(…)
isn’t called.- When
globalUtil.initRetryV4.TriggerRetry()
is then called, and it will panic because the retrier hasen’t been setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. I created a new v4 field
9244446
EphemeralStorageMetrics map[string]int64 `json:"EphemeralStorageMetrics,omitempty"` | ||
ServiceName string `json:"ServiceName,omitempty"` | ||
VPCID string `json:"VPCID,omitempty"` | ||
PullStartedAt string `json:"PullStartedAt,omitempty"` | ||
PullStoppedAt string `json:"PullStoppedAt,omitempty"` | ||
ExecutionStoppedAt string `json:"ExecutionStoppedAt,omitempty"` | ||
AvailabilityZone string `json:"AvailabilityZone,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we plan to eventually use those new fields or have they been added for the sake of completeness and in order to have a perfect 1-1 mapping between what ECS exposes and what we decode ?
I’m wondering if we didn’t skip the decoding of unused fields on purpose to avoid consuming memory to store unused data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we will need all fields as we're going to add a new core check to collect ecs tasks. The check will use workloadmeta.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only left minor simplification suggestions.
/merge |
🚂 MergeQueue Pull request added to the queue. This build is going to start soon! (estimated merge in less than 27m) Use |
Update ECS V4 client and types. This PR is used by #21836
Motivation
Additional Notes
Possible Drawbacks / Trade-offs
Describe how to test/QA your changes