-
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
[CONTP-48] Cluster Agent consistent tagging via global tags #30946
Conversation
6148a34
to
7997429
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=49613788 --os-family=ubuntu Note: This applies to commit 0e1801e |
Regression DetectorRegression Detector ResultsMetrics dashboard Baseline: a166214 Optimization Goals: ❌ Significant changes detected
|
perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
---|---|---|---|---|---|---|
❌ | pycheck_lots_of_tags | % cpu utilization | +8.86 | [+5.23, +12.48] | 1 | Logs |
➖ | basic_py_check | % cpu utilization | +4.66 | [+0.80, +8.51] | 1 | Logs |
➖ | file_to_blackhole_500ms_latency | egress throughput | +0.26 | [-0.51, +1.02] | 1 | Logs |
➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | +0.11 | [-0.61, +0.84] | 1 | Logs |
➖ | file_to_blackhole_0ms_latency | egress throughput | +0.11 | [-0.78, +0.99] | 1 | Logs |
➖ | file_to_blackhole_1000ms_latency_linear_load | egress throughput | +0.10 | [-0.36, +0.57] | 1 | Logs |
➖ | quality_gate_idle | memory utilization | +0.06 | [+0.02, +0.11] | 1 | Logs bounds checks dashboard |
➖ | file_tree | memory utilization | +0.05 | [-0.09, +0.20] | 1 | Logs |
➖ | file_to_blackhole_300ms_latency | egress throughput | +0.01 | [-0.61, +0.64] | 1 | Logs |
➖ | tcp_dd_logs_filter_exclude | ingress throughput | -0.00 | [-0.01, +0.01] | 1 | Logs |
➖ | uds_dogstatsd_to_api | ingress throughput | -0.00 | [-0.11, +0.10] | 1 | Logs |
➖ | quality_gate_idle_all_features | memory utilization | -0.01 | [-0.12, +0.10] | 1 | Logs bounds checks dashboard |
➖ | file_to_blackhole_100ms_latency | egress throughput | -0.04 | [-0.76, +0.68] | 1 | Logs |
➖ | otel_to_otel_logs | ingress throughput | -0.24 | [-0.94, +0.46] | 1 | Logs |
➖ | file_to_blackhole_1000ms_latency | egress throughput | -0.35 | [-1.12, +0.42] | 1 | Logs |
➖ | tcp_syslog_to_blackhole | ingress throughput | -1.74 | [-1.81, -1.66] | 1 | Logs |
Bounds Checks: ❌ Failed
perf | experiment | bounds_check_name | replicates_passed | links |
---|---|---|---|---|
❌ | file_to_blackhole_1000ms_latency | lost_bytes | 0/10 | |
✅ | file_to_blackhole_0ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_0ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_1000ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_1000ms_latency_linear_load | 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_300ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_300ms_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 | memory_usage | 10/10 | bounds checks dashboard |
✅ | quality_gate_idle_all_features | 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:
-
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".
CI Pass/Fail Decision
✅ Passed. All Quality Gates passed.
- quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
70220fb
to
a755ffd
Compare
@@ -57,7 +57,7 @@ type WorkloadMetaCollector struct { | |||
containerEnvAsTags map[string]string | |||
containerLabelsAsTags map[string]string | |||
|
|||
staticTags map[string]string | |||
staticTags map[string][]string // for ECS and EKS Fargate |
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.
Was testing the static/global tags by setting the same tag key to different values such as the following:
DD_TAGS: "source:dca-tags"
DD_EXTRA_TAGS: "source:dca-extra"
DD_CLUSTER_CHECKS_EXTRA_TAGS: "source:dca-cluster_extra"
DD_ORCHESTRATOR_EXPLORER_EXTRA_TAGS: "source:dca-orch_extra"
Realized only the last value was being recorded because this struct was not considering that the same tag key could have multiple values so change the type to map[string][]string
tags := taglist.NewTagList() | ||
// These are the global tags that should only be applied to the internal global entity | ||
// Whereas the static tags are applied to containers and pods directly as well. | ||
globalEnvTags := util.GetGlobalEnvTags() |
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.
Need to create a separate list of the global tags. This is because c.staticTags
get applied directly to all of the containers and pods and we only want these global tags applied to the internal://global-entity-id
. There will be some values duplicated in c.staticTags
and globalEnvTags
, however, the tagList
removes duplicates and everything ends up being properly set on the GlobalEntity
e1cdd11
to
4ed7777
Compare
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.
LGTM!
Thanks for refactoring the global tags helper function and pass the config component as part of the function arguments
/merge |
Devflow running:
|
/merge |
Devflow running:
|
What does this PR do?
This PR unifies the way that data is tagged from cluster checks. All data from a cluster check (including those that are technically not cluster checks but still executed on the DCA on the cluster level such as KSM check) will receive the global tags defined on the cluster agent (DD_TAGS, DD_EXTRA_TAGS, DD_CLUSTER_CHECKS_EXTRA_TAGS, DD_ORCHESTRATOR_EXPLORER_EXTRA_TAGS).
Motivation
Simplify the way users interact with cluster check tags. Currently we have 4 different environment variables that apply differently for some checks (KSM, Orchestrator, others) and also differently depending on where the check is executed (DCA, Node Agent, CLC runner).
Describe how to test/QA your changes
Case 1: DCA w/o CLC
network.http.cant_connect
should contain all of the cluster agent tags and node agent tags because it was dispatched from the cluster agent where the DCA global tags are added to the check config and the node agent's own global tags and also enriched to the metric in the aggregator.kubernetes_state.deployment.count
should contain only the DCA tags since it's executed on the cluster agent.check_run.kube_apiserver_controlplane.up.ok
should contain both the DCA tags and Node Agent tags because the metric is produced from the kube_apiserver check that run on both the DCA and Node Agent.container.cpu.limit
should contain just the Node Agent tags. This is a sanity check that extra tags aren't being applied in the wrong places.DCA w/ CLC
linux.yaml
from above.network.http.cant_connect
: This one will be different. The check is now being executed on the clusterChecksRunner which will not have the Node Agent tags. When the DCA creates and dispatches a check config it will attach its own global tags.kubernetes_state.deployment.count
: DCA tags onlycheck_run.kube_apiserver_controlplane.up.ok
: DCA + Node tagscontainer.cpu.limit
: Node tags onlyGo to the Events Management Explorer and search for events created by your cluster. This will just be a lot of pod creations. Click on them and you should see all of the cluster-agent tags as well as the node-agent tags. We expect both because the orchestrator check runs on both the node-agent and the cluster-agent. They detected the same event and send data to the datadog backend with their own tags and they end up being merged together into one entity.
Possible Drawbacks / Trade-offs
Since these are low cardinality global tags, we don't expect to see a significant change in the number of unique metrics for customer billing.
This does in some ways limit the flexibility for some customers. For instance, they will not be able to use DD_ORCHESTRATOR_EXPLORER_EXTRA_TAGS to just add tags to the events emitted by the orchestrator check. Instead, the tag will be attached to all data from the cluster agent. This makes the tagging interface much simpler for customers.
Additional Notes