Skip to content

enable language detection components only if both reporting and language detection are enabled#23621

Merged
dd-mergequeue[bot] merged 1 commit intomainfrom
adelhajhassan/pld_config_reporting
Mar 21, 2024
Merged

enable language detection components only if both reporting and language detection are enabled#23621
dd-mergequeue[bot] merged 1 commit intomainfrom
adelhajhassan/pld_config_reporting

Conversation

@adel121
Copy link
Copy Markdown
Contributor

@adel121 adel121 commented Mar 11, 2024

What does this PR do?

This PR checks for both language_detection.reporting.enabled and language_detection.enabled when deciding whether or not to activate components of language detection and library injection.

Motivation

Avoid unexpected behaviour in case of miss-configuration.
For example, if language_detection.enabled is set to false, while language_detection.reporting.enabled is set to true, we should not activate any component, since it will lead to wasting resources for no benefit (e.g. enabling the deployment collector in workloadmeta, enabling the handler and patcher, etc.)

Additional Notes

  • This PR is opened for 7.53.0 since the existing behaviour impacts a feature that is in beta and doesn't cause failure, it only activates extra components in case of misconfiguration.

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

  • Ensure the components are still activated and work as expected in case of correct configuration (same QA as this PR)
  • Ensure that no extra components are activated in case language_detection.enabled is set to false whereas language_detection.reporting.enabled is set to true. (See sample QA below)

Deploying with the operator:

apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
  override:
    nodeAgent:
      containers:
        agent:
          env:
            - name: "DD_DOGSTATSD_TAG_CARDINALITY"
              value: "high"
            - name: "DD_LANGUAGE_DETECTION_ENABLED"
              value: "false"
            - name: "DD_LANGUAGE_DETECTION_REPORTING_ENABLED"
              value: "true"
            - name: "DD_LANGUAGE_DETECTION_REPORTING_BUFFER_PERIOD"
              value: "5s"
            - name: "DD_LANGUAGE_DETECTION_REPORTING_REFRESH_PERIOD"
              value: "10s"
            - name: "DD_PROCESS_CONFIG_PROCESS_COLLECTION_ENABLED"
              value: "true"
            - name: "DD_TELEMETRY_ENABLED"
              value: "true"
        process-agent:
          env:
            - name: "DD_LANGUAGE_DETECTION_ENABLED"
              value: "true"
            - name: "DD_PROCESS_CONFIG_PROCESS_COLLECTION_ENABLED"
              value: "true"
    clusterAgent:
      containers:
        cluster-agent:
          env:
            - name: "DD_LANGUAGE_DETECTION_ENABLED"
              value: "false"
            - name: "DD_CLUSTER_AGENT_LANGUAGE_DETECTION_PATCHER_ENABLED"
              value: "true"
            - name: "DD_CLUSTER_AGENT_LANGUAGE_DETECTION_CLEANUP_PERIOD"
              value: "15s"
            - name: "DD_CLUSTER_AGENT_LANGUAGE_DETECTION_CLEANUP_LANGUAGE_TTL"
              value: "30s"

Create any deployment.

Ensure that:

  • the deployment is not collected to workloadmeta (indicating that the kubeapiserver deployment collector is not activated)
  • no cluster agent logs shows that the language detection patcher was activated (e.g. Starting language detection patcher)
  • no agent log shows that the language detection client was activated (e.g. Starting language detection client)

@adel121 adel121 added this to the 7.53.0 milestone Mar 11, 2024
@adel121 adel121 force-pushed the adelhajhassan/pld_config_reporting branch from 2bd8e34 to bd9d793 Compare March 11, 2024 13:37
@adel121 adel121 force-pushed the adelhajhassan/pld_config_reporting branch from bd9d793 to 9e5bc7f Compare March 11, 2024 13:55
@adel121 adel121 marked this pull request as ready for review March 11, 2024 13:57
@adel121 adel121 requested a review from a team as a code owner March 11, 2024 13:57
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Mar 11, 2024

Bloop Bleep... Dogbot Here

Regression Detector Results

Run ID: 21250623-a945-44e2-abbf-24583a989246
Baseline: d6a7e79
Comparison: 9e5bc7f

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.28 [-6.28, +6.83]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI
basic_py_check % cpu utilization +0.84 [-1.44, +3.12]
otel_to_otel_logs ingress throughput +0.52 [-0.12, +1.16]
process_agent_real_time_mode memory utilization +0.31 [+0.27, +0.35]
file_to_blackhole % cpu utilization +0.28 [-6.28, +6.83]
process_agent_standard_check memory utilization +0.25 [+0.21, +0.28]
idle memory utilization +0.02 [-0.01, +0.05]
trace_agent_json ingress throughput +0.01 [-0.02, +0.04]
tcp_dd_logs_filter_exclude ingress throughput +0.00 [-0.00, +0.00]
trace_agent_msgpack ingress throughput +0.00 [-0.00, +0.00]
uds_dogstatsd_to_api ingress throughput +0.00 [-0.00, +0.00]
file_tree memory utilization -0.07 [-0.14, +0.01]
process_agent_standard_check_with_stats memory utilization -0.14 [-0.18, -0.11]
tcp_syslog_to_blackhole ingress throughput -0.21 [-0.26, -0.16]
uds_dogstatsd_to_api_cpu % cpu utilization -1.09 [-2.52, +0.34]

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

@clamoriniere
Copy link
Copy Markdown
Contributor

/merge

@dd-devflow
Copy link
Copy Markdown

dd-devflow Bot commented Mar 21, 2024

🚂 MergeQueue

Pull request added to the queue.

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

Use /merge -c to cancel this operation!

@dd-mergequeue dd-mergequeue Bot merged commit ce30c0f into main Mar 21, 2024
@dd-mergequeue dd-mergequeue Bot deleted the adelhajhassan/pld_config_reporting branch March 21, 2024 17:38
alexgallotta pushed a commit that referenced this pull request May 9, 2024
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.

3 participants