datadog-agent
datadog-agent copied to clipboard
upgrade(metadata): Support Fargate agents in metadata payloads
What does this PR do?
This is a first step to support Fargate agents metadata. Adds the UUID field present in the v5 metadata payload to:
- Inventories payloads
agent_checkpayload- Remote Config payloads
And adds a ECS Fargate section field in the inventory_agent payload, containing ecs_fargate_task_arn & ecs_fargate_cluster_name
Motivation
Additional Notes
See RFC
Possible Drawbacks / Trade-offs
The ECS payload part has not been tested as I couldn't build a new image
Describe how to test/QA your changes
UUID in payloads
- Build & run your agent
- Run the
agent diagnose show-metadata <payload>command for every payload - Check that UUID is here, properly filled, and stable
ECS Fargate inventory_agent Payload
- Update the image in the remote-config-agent-test Fargate cluster in the Sandbox AWS account
- Set the latest RC as the image
- Connect to your container using
aws ecs execute-command --region us-east-1 --cluster remote-config-agent-test --task <task_id> --container datadog-agent --command "/bin/bash" --interactive - Run the
agent diagnose show-metadata inventory-agentcommand, check if theecs_fargate_task_arn&ecs_fargate_cluster_nameare there and properly filled
Reviewer's Checklist
- [x] If known, an appropriate milestone has been selected; otherwise the
Triagemilestone is set. - [x] Use the
major_changelabel 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. - [x] A release note has been added or the
changelog/no-changeloglabel has been applied. - [x] Changed code has automated tests for its functionality.
- [x] Adequate QA/testing plan information is provided. Except if the
qa/skip-qalabel, with required eitherqa/doneorqa/no-code-changelabels, are applied. - [x] At least one
team/..label has been applied, indicating the team(s) that should QA this change. - [x] If applicable, docs team has been notified or an issue has been opened on the documentation repo.
- [x] If applicable, the
need-change/operatorandneed-change/helmlabels have been applied. - [x] If applicable, the
k8s/<min-version>label, indicating the lowest Kubernetes version compatible with this feature. - [x] If applicable, the config template has been updated.
Go Package Import Differences
Baseline: 294ae46153c39545b7e9517a65fed146f50827fb Comparison: 0237c3af7dc096e9d7decb29cc0f7eab5356077b
| binary | os | arch | change |
|---|---|---|---|
| agent | linux | amd64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| agent | linux | arm64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| agent | windows | amd64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| agent | windows | 386 | +6, -0
+github.com/DataDog/datadog-agent/pkg/util/ecs/common
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v1
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v2
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v3or4
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| agent | darwin | amd64 | +6, -0
+github.com/DataDog/datadog-agent/pkg/util/ecs/common
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v1
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v2
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v3or4
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| agent | darwin | arm64 | +6, -0
+github.com/DataDog/datadog-agent/pkg/util/ecs/common
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v1
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v2
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v3or4
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| iot-agent | linux | amd64 | +6, -0
+github.com/DataDog/datadog-agent/pkg/util/ecs/common
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v1
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v2
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v3or4
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| iot-agent | linux | arm64 | +6, -0
+github.com/DataDog/datadog-agent/pkg/util/ecs/common
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v1
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v2
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v3or4
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| heroku-agent | linux | amd64 | +6, -0
+github.com/DataDog/datadog-agent/pkg/util/ecs/common
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v1
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v2
+github.com/DataDog/datadog-agent/pkg/util/ecs/metadata/v3or4
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| cluster-agent | linux | amd64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| cluster-agent | linux | arm64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| cluster-agent-cloudfoundry | linux | amd64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| cluster-agent-cloudfoundry | linux | arm64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| dogstatsd | linux | amd64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| dogstatsd | linux | arm64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| process-agent | linux | amd64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| process-agent | linux | arm64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| process-agent | windows | amd64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| process-agent | darwin | amd64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| process-agent | darwin | arm64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| heroku-process-agent | linux | amd64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| security-agent | linux | amd64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
| security-agent | linux | arm64 | +1, -0
+github.com/DataDog/datadog-agent/pkg/util/uuid
|
Bloop Bleep... Dogbot Here
Regression Detector Results
Run ID: 0d5412b9-dd91-49d0-a190-6123030a61df Baseline: 294ae46153c39545b7e9517a65fed146f50827fb Comparison: 0237c3af7dc096e9d7decb29cc0f7eab5356077b Total CPUs: 7
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.32 | [-6.89, +6.25] |
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI |
|---|---|---|---|---|
| ➖ | tcp_syslog_to_blackhole | ingress throughput | +1.74 | [+1.67, +1.80] |
| ➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | +1.46 | [+0.02, +2.89] |
| ➖ | uds_dogstatsd_to_api | ingress throughput | +0.00 | [-0.00, +0.00] |
| ➖ | tcp_dd_logs_filter_exclude | ingress throughput | +0.00 | [-0.00, +0.00] |
| ➖ | trace_agent_msgpack | ingress throughput | -0.00 | [-0.02, +0.01] |
| ➖ | trace_agent_json | ingress throughput | -0.03 | [-0.06, +0.01] |
| ➖ | file_tree | memory utilization | -0.11 | [-0.19, -0.02] |
| ➖ | idle | memory utilization | -0.24 | [-0.27, -0.21] |
| ➖ | file_to_blackhole | % cpu utilization | -0.32 | [-6.89, +6.25] |
| ➖ | otel_to_otel_logs | ingress throughput | -0.37 | [-0.99, +0.24] |
| ➖ | process_agent_real_time_mode | memory utilization | -0.41 | [-0.44, -0.38] |
| ➖ | process_agent_standard_check_with_stats | memory utilization | -0.45 | [-0.48, -0.42] |
| ➖ | process_agent_standard_check | memory utilization | -0.58 | [-0.62, -0.54] |
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".
Removed requests from processes & agent-apm as they were mistakenly added after a bad merge of main into this branch.
/merge
:steam_locomotive: 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!
:steam_locomotive: MergeQueue
Added to the queue.
There are 2 builds ahead of this PR! (estimated merge in less than 48m)
Use /merge -c to cancel this operation!