Skip to content

fix pld config#23293

Merged
dd-mergequeue[bot] merged 3 commits intomainfrom
adelhajhassan/fix_pld_config
Mar 4, 2024
Merged

fix pld config#23293
dd-mergequeue[bot] merged 3 commits intomainfrom
adelhajhassan/fix_pld_config

Conversation

@adel121
Copy link
Copy Markdown
Contributor

@adel121 adel121 commented Feb 29, 2024

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

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Feb 29, 2024

Bloop Bleep... Dogbot Here

Regression Detector Results

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

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

Comment thread cmd/cluster-agent/subcommands/start/command.go Outdated
Comment thread cmd/cluster-agent/subcommands/start/command.go Outdated
Comment on lines +54 to +55
languageTTL = config.Datadog.GetDuration("cluster_agent.language_detection.cleanup.language_ttl")
cleanupPeriod := config.Datadog.GetDuration("cluster_agent.language_detection.cleanup.period")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we pass the config.Component to cmd/cluster-agent/api/.StartServer function in

if err := api.StartServer(wmeta, taggerComp, demultiplexer, optional.NewOption(collector), statusComponent, secretResolver); err != nil {
and use the component to get the config values?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Based on our previous discussion, leaving this for a separate PR.

Copy link
Copy Markdown
Contributor

@GustavoCaso GustavoCaso left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to update the pkconfig references 😄

@adel121
Copy link
Copy Markdown
Contributor Author

adel121 commented Mar 4, 2024

/merge

@dd-devflow
Copy link
Copy Markdown

dd-devflow Bot commented Mar 4, 2024

🚂 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-mergequeue dd-mergequeue Bot merged commit 0608f9c into main Mar 4, 2024
@dd-mergequeue dd-mergequeue Bot deleted the adelhajhassan/fix_pld_config branch March 4, 2024 14:03
@github-actions github-actions Bot modified the milestones: 7.52.0, 7.53.0 Mar 4, 2024
agent-platform-auto-pr Bot pushed a commit that referenced this pull request Mar 4, 2024
* fix pld config

* PR review

(cherry picked from commit 0608f9c)
adel121 added a commit that referenced this pull request Mar 5, 2024
* fix pld config

* PR review

(cherry picked from commit 0608f9c)

Co-authored-by: Adel Haj Hassan <41540817+adel121@users.noreply.github.com>
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