Skip to content

[Orchestrator] add new check to collect ecs tasks#22060

Merged
dd-mergequeue[bot] merged 5 commits intomainfrom
kangyi/ecs-new-core-check
Mar 21, 2024
Merged

[Orchestrator] add new check to collect ecs tasks#22060
dd-mergequeue[bot] merged 5 commits intomainfrom
kangyi/ecs-new-core-check

Conversation

@kangyili
Copy link
Copy Markdown
Contributor

@kangyili kangyili commented Jan 15, 2024

What does this PR do?

This PR requires

  1. Update Workloadmeta ECS collector to use metadata v4 endpoint #21836
  2. update ECS fargate collector to use v4 endpoint #23253
  3. [Orchestrator] update code structure #23823
  4. add ecs task payload agent-payload#281

New check orchestrator_ecs

Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
  • A release note has been added or the changelog/no-changelog label has been applied.
  • Changed code has automated tests for its functionality.
  • Adequate QA/testing plan information is provided. Except if the qa/skip-qa label, with required either qa/done or qa/no-code-change labels, are applied.
  • At least one team/.. label has been applied, indicating the team(s) that should QA this change.
  • If applicable, docs team has been notified or an issue has been opened on the documentation repo.
  • If applicable, the need-change/operator and need-change/helm labels have been applied.
  • If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
  • If applicable, the config template has been updated.

@cit-pr-commenter
Copy link
Copy Markdown

cit-pr-commenter bot commented Jan 15, 2024

Go Package Import Differences

Baseline: 46c7bd1
Comparison: e78b81b

binaryosarchchange
agentlinuxamd64
+4, -0
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/collectors/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/processors/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/transformers/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/orchestrator/ecs
agentlinuxarm64
+4, -0
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/collectors/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/processors/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/transformers/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/orchestrator/ecs
agentwindowsamd64
+4, -0
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/collectors/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/processors/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/transformers/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/orchestrator/ecs
agentwindows386
+1, -0
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/orchestrator/ecs
agentdarwinamd64
+4, -0
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/collectors/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/processors/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/transformers/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/orchestrator/ecs
agentdarwinarm64
+4, -0
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/collectors/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/processors/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/transformers/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/orchestrator/ecs
iot-agentlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/orchestrator/ecs
iot-agentlinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/orchestrator/ecs
heroku-agentlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/orchestrator/ecs
cluster-agentlinuxamd64
+4, -0
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/collectors/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/processors/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/transformers/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/orchestrator/ecs
cluster-agentlinuxarm64
+4, -0
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/collectors/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/processors/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/orchestrator/transformers/ecs
+github.com/DataDog/datadog-agent/pkg/collector/corechecks/orchestrator/ecs

@kangyili kangyili added this to the 7.52.0 milestone Jan 15, 2024
@kangyili kangyili force-pushed the kangyi/ecs-new-core-check branch from 0a9bc12 to 19014bd Compare January 15, 2024 16:10
@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Jan 15, 2024

Bloop Bleep... Dogbot Here

Regression Detector Results

Run ID: d9233538-ba17-4993-bdc8-1153e942e6ee
Baseline: b4f0a17
Comparison: 9fd8b7a3d7ac7cdf81ad97a36cf575b91067344e

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

No significant changes in experiment optimization goals

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

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Experiments ignored for regressions

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

perf experiment goal Δ mean % Δ mean % CI
file_to_blackhole % cpu utilization +0.02 [-6.28, +6.32]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI
otel_to_otel_logs ingress throughput +1.30 [+0.64, +1.95]
process_agent_standard_check memory utilization +0.63 [+0.59, +0.67]
idle memory utilization +0.38 [+0.34, +0.43]
file_to_blackhole % cpu utilization +0.02 [-6.28, +6.32]
tcp_dd_logs_filter_exclude ingress throughput +0.02 [-0.04, +0.07]
uds_dogstatsd_to_api ingress throughput +0.00 [-0.06, +0.06]
trace_agent_json ingress throughput +0.00 [-0.01, +0.01]
trace_agent_msgpack ingress throughput -0.02 [-0.03, -0.01]
process_agent_standard_check_with_stats memory utilization -0.04 [-0.09, -0.00]
uds_dogstatsd_to_api_cpu % cpu utilization -0.18 [-2.98, +2.62]
file_tree memory utilization -0.68 [-0.78, -0.58]
process_agent_real_time_mode memory utilization -0.83 [-0.87, -0.78]
tcp_syslog_to_blackhole ingress throughput -0.95 [-1.03, -0.87]
basic_py_check % cpu utilization -2.04 [-4.28, +0.21]
pycheck_1000_100byte_tags % cpu utilization -2.63 [-7.52, +2.25]

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:

  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".

Copy link
Copy Markdown
Contributor

@cswatt cswatt left a comment

Choose a reason for hiding this comment

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

release notes approved by docs

Copy link
Copy Markdown
Contributor

@ogaca-dd ogaca-dd left a comment

Choose a reason for hiding this comment

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

LGTM for files owned by agent shared components

Comment thread go.mod Outdated
Comment thread pkg/collector/corechecks/cluster/orchestrator/processors/common/base.go Outdated
Comment thread pkg/orchestrator/model/types.go Outdated
Comment thread pkg/collector/corechecks/cluster/orchestrator/collector_bundle.go Outdated
Comment thread pkg/collector/corechecks/cluster/orchestrator/collectors/ecs/task.go Outdated
@mfpierre mfpierre modified the milestones: 7.52.0, 7.53.0 Feb 15, 2024
@kangyili kangyili requested a review from a team February 28, 2024 14:31
@kangyili kangyili force-pushed the kangyi/ecs branch 3 times, most recently from 8d02b6a to 09f57df Compare March 1, 2024 09:19
@kangyili kangyili marked this pull request as draft March 1, 2024 09:32
@kangyili kangyili force-pushed the kangyi/ecs-new-core-check branch from 19014bd to 7bac94c Compare March 1, 2024 09:33
@kangyili kangyili changed the base branch from kangyi/ecs to kangyi/ecs-fargate March 1, 2024 09:33
@kangyili kangyili force-pushed the kangyi/ecs-new-core-check branch 3 times, most recently from b6cfa1d to 66bbe5d Compare March 1, 2024 13:28
@kangyili
Copy link
Copy Markdown
Contributor Author

kangyili commented Mar 18, 2024

I created a new PR only updates code structure #23823

@kangyili kangyili force-pushed the kangyi/ecs-new-core-check branch from 58f15d5 to 076db95 Compare March 18, 2024 12:33
Comment thread go.mod Outdated
Comment thread pkg/collector/corechecks/cluster/orchestrator/collectors/ecs/task.go Outdated
@kangyili kangyili force-pushed the kangyi/update-code-structure branch from e9f189e to 52fb6a1 Compare March 19, 2024 08:50
Base automatically changed from kangyi/update-code-structure to main March 19, 2024 11:01
@kangyili kangyili force-pushed the kangyi/ecs-new-core-check branch from 9fd8b7a to d8faa74 Compare March 19, 2024 14:02
@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Mar 19, 2024

Test changes on VM

Use this command from test-infra-definitions to manually test this PR changes on a VM:

inv create-vm --pipeline-id=30572198 --os-family=ubuntu

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Mar 19, 2024

Regression Detector

Regression Detector Results

Run ID: cf9295b8-f32c-4900-9c2c-31aeda2746e4
Baseline: 46c7bd1
Comparison: e78b81b

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

No significant changes in experiment optimization goals

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

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Experiments ignored for regressions

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

perf experiment goal Δ mean % Δ mean % CI
file_to_blackhole % cpu utilization +1.32 [-5.10, +7.75]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI
file_to_blackhole % cpu utilization +1.32 [-5.10, +7.75]
idle memory utilization +0.29 [+0.26, +0.32]
tcp_syslog_to_blackhole ingress throughput +0.15 [+0.07, +0.23]
otel_to_otel_logs ingress throughput +0.11 [-0.31, +0.52]
process_agent_standard_check_with_stats memory utilization +0.06 [+0.04, +0.09]
trace_agent_msgpack ingress throughput +0.03 [+0.01, +0.04]
tcp_dd_logs_filter_exclude ingress throughput +0.02 [-0.02, +0.05]
trace_agent_json ingress throughput +0.00 [-0.03, +0.04]
uds_dogstatsd_to_api ingress throughput +0.00 [-0.20, +0.20]
pycheck_1000_100byte_tags % cpu utilization -0.07 [-4.97, +4.83]
file_tree memory utilization -0.24 [-0.33, -0.16]
process_agent_real_time_mode memory utilization -0.59 [-0.62, -0.56]
process_agent_standard_check memory utilization -0.63 [-0.67, -0.59]
basic_py_check % cpu utilization -1.14 [-3.62, +1.34]
uds_dogstatsd_to_api_cpu % cpu utilization -2.94 [-5.60, -0.28]

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:

  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".

Comment thread pkg/collector/corechecks/cluster/orchestrator/collectors/ecs/task.go Outdated
Comment thread pkg/collector/corechecks/cluster/orchestrator/collectors/ecs/task.go Outdated
Comment thread pkg/collector/corechecks/cluster/orchestrator/collectors/ecs/task.go Outdated
Comment thread pkg/collector/corechecks/cluster/orchestrator/collectors/ecs/task.go Outdated
Comment thread pkg/collector/corechecks/cluster/orchestrator/collectors/ecs/task.go Outdated
}

taskModel.Tags = tags
taskModel.EcsTags = toTags(task.Task.Tags)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there any normalization needed for those tags?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if we should do the normalisation here as the tag standard of ecs and datadog are different, changing tags can confuse user. We can probably leave it as it is for now

Comment thread pkg/config/env/environment_container_features.go Outdated
Comment thread pkg/collector/corechecks/orchestrator/ecs/ecs.go
@kangyili kangyili force-pushed the kangyi/ecs-new-core-check branch from 7225ef1 to 2cc7e05 Compare March 21, 2024 12:17
@kangyili
Copy link
Copy Markdown
Contributor Author

/merge

@dd-devflow
Copy link
Copy Markdown

dd-devflow bot commented Mar 21, 2024

🚂 MergeQueue

Pull request added to the queue.

There are 3 builds ahead! (estimated merge in less than 29m)

Use /merge -c to cancel this operation!

@dd-devflow
Copy link
Copy Markdown

dd-devflow bot commented Mar 21, 2024

❌ MergeQueue

This merge request conflicts with another merge request ahead in the queue.

The merge requests in front of this one are:

If you need support, contact us on Slack #ci-interfaces with those details!

@kangyili
Copy link
Copy Markdown
Contributor Author

/merge

@dd-devflow
Copy link
Copy Markdown

dd-devflow bot commented Mar 21, 2024

🚂 MergeQueue

Pull request added to the queue.

There are 3 builds ahead! (estimated merge in less than 29m)

Use /merge -c to cancel this operation!

@dd-devflow
Copy link
Copy Markdown

dd-devflow bot commented Mar 21, 2024

❌ MergeQueue

This merge request conflicts with another merge request ahead in the queue.

The merge requests in front of this one are:

If you need support, contact us on Slack #ci-interfaces with those details!

@kangyili
Copy link
Copy Markdown
Contributor Author

/merge

@dd-devflow
Copy link
Copy Markdown

dd-devflow bot commented Mar 21, 2024

🚂 MergeQueue

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
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!

@dd-devflow
Copy link
Copy Markdown

dd-devflow bot commented Mar 21, 2024

🚂 MergeQueue

Added to the queue.

This build is next! (estimated merge in less than 28m)

Use /merge -c to cancel this operation!

@dd-mergequeue dd-mergequeue bot merged commit e6ec7d5 into main Mar 21, 2024
@dd-mergequeue dd-mergequeue bot deleted the kangyi/ecs-new-core-check branch March 21, 2024 19:45
alexgallotta pushed a commit that referenced this pull request May 9, 2024
* add new check to collect ecs tasks

* address feedback

* bump agent payload version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants