datadog-agent icon indicating copy to clipboard operation
datadog-agent copied to clipboard

fix pld config

Open adel121 opened this issue 2 years ago • 1 comments

What does this PR do?

Fix the configuration parameters for language detection feature.

Motivation

Achieve separation between:

  • language detection performed b process-agent (detecting languages on the level of processes)
  • language detection performed by core agent and cluster agent (collecting process-level languages and aggregating them by deployment-level).

This change has no impact on the functional aspects of the feature.

Additional Notes

  • This should be merged in 7.52.0 because it is related to a new feature and changing feature configuration in the future in this manner will break existing deployments with old configurations.

With the new configuration:

  • detecting languages by process is enabled by language_detection.enabled
  • reporting detected process languages to the cluster agent by the node agent is enabled by language_detection.reporting.enabled
  • enabling/disabling the language detection patcher is controlled by cluster_agent.language_detection.patcher.enabled (enabled by default)
  • enabling/disabling injecting tracing libraries based on automatically-detected languages is controlled by admission_controller.auto_instrumentation.inject_auto_detected_libraries (disabled by default for now)
  • the process language detection handler (in the DCA) will return Service Unavailable response in case language_detection.enabled is set to false on the cluster agent.

Possible Drawbacks / Trade-offs

  • Should not change behaviour at all, it is only renaming environment variables and changing bindings in config.

Describe how to test/QA your changes

Same QA as this PR but using the new configurations.

A sample config using 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: "true"
            - 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: "true"
            - name: "DD_LANGUAGE_DETECTION_REPORTING_ENABLED"
              value: "true"
            - 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"

From the output of agent config on the cluster agent:

.......
language_detection:
  enabled: true
  reporting:
    buffer_period: 10s
    enabled: true
    refresh_period: 20m
......
......
cluster_agent:
......
  language_detection:
    cleanup:
      language_ttl: 30s
      period: 15s
    patcher:
      enabled: true
......

From the output of agent config on the core agent:

....
language_detection:
  enabled: true
  reporting:
    buffer_period: 5s
    enabled: true
    refresh_period: 10s
....
....
cluster_agent:
.....
  language_detection:
    cleanup:
      language_ttl: 30m
      period: 10m
    patcher:
      enabled: true
....

adel121 avatar Feb 29 '24 14:02 adel121

Bloop Bleep... Dogbot Here

Regression Detector Results

Run ID: 451fba94-55f3-488d-9856-64c833926cfb Baseline: 61458f7d56c4bef7e97a97ba6ba5f5abf0ecfe8e Comparison: 113708facb2a38aeb0739aef0e4f19917230a660

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

Experiments with missing or malformed data

  • basic_py_check

Usually, this warning means that there is no usable optimization goal data for that experiment, which could be a result of misconfiguration.

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.12 [-7.63, +5.39]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI
process_agent_standard_check_with_stats memory utilization +1.14 [+1.10, +1.18]
file_tree memory utilization +0.72 [+0.64, +0.80]
uds_dogstatsd_to_api_cpu % cpu utilization +0.33 [-1.12, +1.78]
otel_to_otel_logs ingress throughput +0.32 [-0.30, +0.95]
process_agent_standard_check memory utilization +0.16 [+0.11, +0.21]
idle memory utilization +0.05 [+0.01, +0.10]
trace_agent_msgpack ingress throughput +0.03 [+0.02, +0.05]
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_json ingress throughput -0.01 [-0.03, +0.02]
tcp_syslog_to_blackhole ingress throughput -0.36 [-0.42, -0.31]
process_agent_real_time_mode memory utilization -0.49 [-0.53, -0.45]
file_to_blackhole % cpu utilization -1.12 [-7.63, +5.39]

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

pr-commenter[bot] avatar Feb 29 '24 16:02 pr-commenter[bot]

/merge

adel121 avatar Mar 04 '24 13:03 adel121

:steam_locomotive: MergeQueue

Pull request added to the queue.

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

Use /merge -c to cancel this operation!

dd-devflow[bot] avatar Mar 04 '24 13:03 dd-devflow[bot]