Skip to content
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

feat(dogstatsd): add cardinality common field #32917

Merged

Conversation

wdhif
Copy link
Member

@wdhif wdhif commented Jan 13, 2025

What does this PR do?

Add a new card: common field to DogStatsD Datagram spec. This new field is used by the libraries to override the Agent cardinality.

Motivation

This is done to allow customer to have more granularity for cardinality.

Describe how you validated your changes

With the Operator installed, deploy the following manifest:

datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
  override:
    nodeAgent:
      image:
        tag: TAG
        pullPolicy: Always
    clusterAgent:
      image:
        tag: TAG
        pullPolicy: Always
    clusterChecksRunner:
      image:
        tag: TAG
        pullPolicy: Always
global:
    kubelet:
      tlsVerify: false
    credentials:
      apiSecret:
        secretName: datadog-secret
        keyName: api-key
      appSecret:
        secretName: datadog-secret
        keyName: app-key
    originDetectionUnified:
      enabled: true
  features:
    admissionController:
      enabled: true
    dogstatsd:
      originDetectionEnabled: true
      tagCardinality: "high"
      hostPortConfig:
        enabled: true

Deploy the following application:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: datadogpy
spec:
  replicas: 1
  selector:
    matchLabels:
      app: datadogpy
  template:
    metadata:
      labels:
        app: datadogpy
        admission.datadoghq.com/enabled: "true"
    spec:
      containers:
      - name: datadogpy
        image: wdhifdatadog/datadogpy
        imagePullPolicy: Always
        env:
        - name: USER
          value: "wdhif"
        - name: DD_DOGSTATSD_URL
          value: /var/run/datadog/dsd.socket
        - name: DD_AGENT_HOST
          valueFrom:
            fieldRef:
              fieldPath: status.hostIP
        - name: DD_ENTITY_ID
          valueFrom:
            fieldRef:
              fieldPath: metadata.uid
        volumeMounts:
        - mountPath: /var/run/datadog
          name: dogstatsd-socket
      volumes:
      - name: dogstatsd-socket
        hostPath:
          path: /var/run/datadog/

Using this notebook, you should see each metrics with the correct tags: https://dddev.datadoghq.com/notebook/11080048/dogstatsd-cardinality-test?notebookType=legacy&view=view-mode

image image image

Possible Drawbacks / Trade-offs

None

Additional Notes

None

@github-actions github-actions bot added medium review PR review might take time team/agent-metrics-logs labels Jan 13, 2025
@wdhif wdhif added the qa/rc-required Only for a PR that requires validation on the Release Candidate label Jan 13, 2025
@wdhif wdhif force-pushed the CONTP-582/wassim.dhif/dogstatsd-cardinality-field branch from e508683 to 406ad4b Compare January 13, 2025 15:35
@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Jan 13, 2025

Uncompressed package size comparison

Comparison with ancestor f701888e2d8a53a9a8d0f3eeb78891aa73ab9320

Diff per package
package diff status size ancestor threshold
datadog-dogstatsd-amd64-deb 0.01MB ⚠️ 58.87MB 58.87MB 0.50MB
datadog-dogstatsd-arm64-deb 0.01MB ⚠️ 56.39MB 56.38MB 0.50MB
datadog-dogstatsd-x86_64-rpm 0.00MB 58.95MB 58.95MB 0.50MB
datadog-dogstatsd-x86_64-suse 0.00MB 58.95MB 58.95MB 0.50MB
datadog-heroku-agent-amd64-deb 0.00MB 477.83MB 477.83MB 0.50MB
datadog-iot-agent-x86_64-rpm 0.00MB 93.99MB 93.98MB 0.50MB
datadog-iot-agent-x86_64-suse 0.00MB 93.98MB 93.98MB 0.50MB
datadog-iot-agent-amd64-deb 0.00MB 93.92MB 93.91MB 0.50MB
datadog-agent-x86_64-rpm 0.00MB 939.28MB 939.28MB 0.50MB
datadog-agent-x86_64-suse 0.00MB 939.28MB 939.28MB 0.50MB
datadog-iot-agent-aarch64-rpm 0.00MB 90.04MB 90.04MB 0.50MB
datadog-agent-aarch64-rpm 0.00MB 925.92MB 925.92MB 0.50MB
datadog-agent-amd64-deb 0.00MB 929.54MB 929.54MB 0.50MB
datadog-agent-arm64-deb 0.00MB 916.20MB 916.20MB 0.50MB
datadog-iot-agent-arm64-deb 0.00MB 89.97MB 89.97MB 0.50MB

Decision

⚠️ Warning

@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Jan 13, 2025

Test changes on VM

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

inv aws.create-vm --pipeline-id=53780842 --os-family=ubuntu

Note: This applies to commit e11e7fbc

Copy link

cit-pr-commenter bot commented Jan 13, 2025

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: 70a8ab21-8df9-46d5-aad6-e2c03f7d21ec

Baseline: f701888
Comparison: e11e7fb
Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
quality_gate_logs % cpu utilization +2.56 [-0.48, +5.59] 1 Logs
uds_dogstatsd_to_api_cpu % cpu utilization +1.57 [+0.67, +2.47] 1 Logs
file_to_blackhole_1000ms_latency egress throughput +0.66 [-0.16, +1.47] 1 Logs
quality_gate_idle memory utilization +0.43 [+0.39, +0.46] 1 Logs bounds checks dashboard
file_tree memory utilization +0.10 [+0.05, +0.16] 1 Logs
file_to_blackhole_0ms_latency_http1 egress throughput +0.10 [-0.79, +0.98] 1 Logs
file_to_blackhole_0ms_latency_http2 egress throughput +0.05 [-0.89, +1.00] 1 Logs
file_to_blackhole_0ms_latency egress throughput +0.03 [-0.87, +0.93] 1 Logs
file_to_blackhole_500ms_latency egress throughput +0.02 [-0.77, +0.80] 1 Logs
file_to_blackhole_300ms_latency egress throughput +0.02 [-0.62, +0.65] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.02, +0.02] 1 Logs
file_to_blackhole_100ms_latency egress throughput -0.00 [-0.75, +0.75] 1 Logs
uds_dogstatsd_to_api ingress throughput -0.01 [-0.28, +0.27] 1 Logs
quality_gate_idle_all_features memory utilization -0.01 [-0.06, +0.03] 1 Logs bounds checks dashboard
file_to_blackhole_1000ms_latency_linear_load egress throughput -0.15 [-0.61, +0.31] 1 Logs
tcp_syslog_to_blackhole ingress throughput -0.86 [-0.94, -0.77] 1 Logs

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed links
file_to_blackhole_0ms_latency lost_bytes 10/10
file_to_blackhole_0ms_latency memory_usage 10/10
file_to_blackhole_0ms_latency_http1 lost_bytes 10/10
file_to_blackhole_0ms_latency_http1 memory_usage 10/10
file_to_blackhole_0ms_latency_http2 lost_bytes 10/10
file_to_blackhole_0ms_latency_http2 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 intake_connections 10/10 bounds checks dashboard
quality_gate_idle memory_usage 10/10 bounds checks dashboard
quality_gate_idle_all_features intake_connections 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 bounds checks dashboard
quality_gate_logs intake_connections 10/10
quality_gate_logs lost_bytes 10/10
quality_gate_logs memory_usage 10/10

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:

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

CI Pass/Fail Decision

Passed. All Quality Gates passed.

  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.

@wdhif wdhif force-pushed the CONTP-582/wassim.dhif/dogstatsd-cardinality-field branch 9 times, most recently from 40d3667 to b5d3918 Compare January 17, 2025 16:28
@wdhif wdhif force-pushed the CONTP-582/wassim.dhif/dogstatsd-cardinality-field branch 2 times, most recently from c50f43a to 29786f5 Compare January 19, 2025 19:50
@wdhif wdhif marked this pull request as ready for review January 20, 2025 10:33
@wdhif wdhif requested review from a team as code owners January 20, 2025 10:33
Copy link
Contributor

@kayayarai kayayarai left a comment

Choose a reason for hiding this comment

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

Suggested release note wording, but 👍

@wdhif wdhif added this to the 7.64.0 milestone Jan 21, 2025
@wdhif wdhif added the team/container-platform The Container Platform Team label Jan 21, 2025
@wdhif wdhif force-pushed the CONTP-582/wassim.dhif/dogstatsd-cardinality-field branch from b93737b to e11e7fb Compare January 23, 2025 10:47
Copy link
Member

@tobz tobz left a comment

Choose a reason for hiding this comment

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

LGTM

@wdhif
Copy link
Member Author

wdhif commented Jan 30, 2025

/merge

@dd-devflow
Copy link

dd-devflow bot commented Jan 30, 2025

Devflow running: /merge

View all feedbacks in Devflow UI.


2025-01-30 09:54:58 UTC ℹ️ MergeQueue: pull request added to the queue

The median merge time in main is 27m.


2025-01-30 10:21:17 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit 5675c7e into main Jan 30, 2025
226 checks passed
@dd-mergequeue dd-mergequeue bot deleted the CONTP-582/wassim.dhif/dogstatsd-cardinality-field branch January 30, 2025 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium review PR review might take time qa/rc-required Only for a PR that requires validation on the Release Candidate team/agent-metrics-logs team/container-platform The Container Platform Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants