Default datadog.logs.autoMultiLineDetection to true - #2801
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 71a39d536c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| {{- range .Values.agents.containers.agent.env }} | ||
| {{- if eq .name "DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION" }} | ||
| {{- $autoMultiLineOverridden = true }} | ||
| {{- end }} | ||
| {{- end }} |
There was a problem hiding this comment.
Honor global env overrides before emitting the default
When users set DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION=false through the supported global node-agent knobs (datadog.env or datadog.envDict), those entries are rendered earlier by containers-common-env, but this override check only scans agents.containers.agent.env, so the new chart default still emits a later DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION=true and prevents that opt-out from taking effect. This matters during upgrades where users pin the env var globally to preserve the old behavior; include the global env sources in the duplicate check or render the chart-driven value before user-provided envs.
Useful? React with 👍 / 👎.
71a39d5 to
4f8ff55
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the charts/datadog Helm chart to enable Datadog Agent automatic multi-line log detection (V2) by default by flipping datadog.logs.autoMultiLineDetection from false to true, and adjusts template rendering to avoid emitting a conflicting duplicate DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION env var when users override it via chart-provided env mechanisms.
Changes:
- Default
datadog.logs.autoMultiLineDetectiontotrue(and update the associated docs link). - Prevent duplicate
DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTIONenv var rendering when the user already sets it viadatadog.env/envDictoragents.containers.agent.env/envDict. - Bump chart version to
3.232.0, update README/CHANGELOG, and refresh rendered manifest baselines.
Reviewed changes
Copilot reviewed 52 out of 52 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/datadog/baseline/manifests/workload_protection.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/workload_protection_direct_sender.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/usm_daemonset_default.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/talos_linux_with_system_probe.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/system_probe_daemonset_default.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/securityContextOverrides_allAgents.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/sbom_enabled.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/registry_migration_ap1.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/other_default.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/otel-agent_volume_mounts.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/otel-agent_logs_collection.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/otel-agent_gateway.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/otel-agent_gateway_fips.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/otel-agent_full.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/otel-agent_full_fips.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/otel-agent_container_ports.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/otel-agent_configmap.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/otel-agent_config_ports.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/otel_enabled.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/npm_daemonset_default.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/kube-state-metrics-custom-resources.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/gpu_monitoring.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/gpu_monitoring_cos.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/gke_autopilot_workloadallowlist_otel_feature_gates.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/gke_autopilot_workloadallowlist_logs.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/gke_autopilot_workloadallowlist_default.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/gke_autopilot_workloadallowlist_apm.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/gke_autopilot_workloadallowlist_adp.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/gke_autopilot_usm.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/gke_autopilot_system_probe.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/gke_autopilot_npm.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/gke_autopilot_compliance_run_in_system_probe.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/gke_autopilot_allowlistedv2workload_kubelet_apiserver.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/gke_autopilot_allowlistedv2workload_default.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/gdc_daemonset_default.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/gdc_compliance_run_in_system_probe.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/default_all.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/default_all_windows.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/daemonset_default.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/confd.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/compliance_run_in_system_probe.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/compliance_run_in_system_probe_only.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/compliance_run_in_system_probe_cws_in_security_agent.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/agent-workload_exclude.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/agent-clusterchecks-deployment_default.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/adp-enabled-dsd-enabled-7.75.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| test/datadog/baseline/manifests/adp-enabled-dsd-enabled-7.74.yaml | Baseline updated to reflect DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION="true" default. |
| charts/datadog/values.yaml | Flip datadog.logs.autoMultiLineDetection default to true and update reference URL. |
| charts/datadog/templates/_container-agent.yaml | Skip emitting DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION when user already defines it via supported env inputs. |
| charts/datadog/README.md | Update chart version badge and documented default for datadog.logs.autoMultiLineDetection. |
| charts/datadog/Chart.yaml | Bump chart version to 3.232.0. |
| charts/datadog/CHANGELOG.md | Document the default flip and the env-override duplicate-render fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| {{- $autoMultiLineEnvName := "DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION" }} | ||
| {{- $autoMultiLineOverridden := false }} | ||
| {{- range (concat .Values.datadog.env .Values.agents.containers.agent.env) }} | ||
| {{- if eq .name $autoMultiLineEnvName }} | ||
| {{- $autoMultiLineOverridden = true }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- if or (hasKey .Values.datadog.envDict $autoMultiLineEnvName) (hasKey .Values.agents.containers.agent.envDict $autoMultiLineEnvName) }} | ||
| {{- $autoMultiLineOverridden = true }} | ||
| {{- end }} | ||
| {{- if not $autoMultiLineOverridden }} | ||
| - name: DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION | ||
| value: {{ .Values.datadog.logs.autoMultiLineDetection | quote }} | ||
| {{- end }} |
V2 automatic multi-line log detection becomes the default agent behavior (AGTINFR-744). Also fixes CONS-7733: DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION was rendered twice with conflicting values when a manual agents.containers.agent.env entry set the same variable as datadog.logs.autoMultiLineDetection; the chart-driven entry is now skipped when the user already supplies one via env.
datadog.env and datadog.envDict are rendered by containers-common-env before the chart-driven DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION entry, so an override via those (or agents.containers.agent.envDict) wasn't being detected, letting the chart-driven value still emit alongside it.
The helm-vs-operator config mapper only carries a values.yaml key into the generated DDA when it's explicitly set in the source file. Since the operator's own default for autoMultiLineDetection is still false, fixtures that relied on the (now-true) Helm chart default diverged from the operator-rendered config in the yamlmapper integ tests. Set the field explicitly to match, mirroring the existing apm-logs/full-observability fixtures.
…takes effect The datadog-operator's logcollection feature only applies any of its sub-settings (including autoMultiLineDetection) when spec.features.logCollection.enabled is true — otherwise Configure() short-circuits and the whole feature block is left at its zero value. The prior fixture fix set autoMultiLineDetection alone, which the mapper carried into the DDA correctly but the operator ignored since logCollection.enabled was never set. Add datadog.logs.enabled: true alongside it, matching the working apm-logs/full-observability fixtures.
b9b2c3d to
dfb1477
Compare
|
Replaced by #2841, re-opened from a branch on |
What does this PR do?
Flips the default of
datadog.logs.autoMultiLineDetectionfromfalsetotrue. Automatic multi-line log detection (V2) becomes the default Agent behavior, targeting Agent 7.82.x. See https://docs.datadoghq.com/agent/logs/auto_multiline_detection/Related: AGTINFR-744
Also fixes CONS-7733:
DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTIONwas rendered twice with conflicting values whenever a manualagents.containers.agent.enventry set the same variable thatdatadog.logs.autoMultiLineDetectionalso sets. This bug becomes much more visible now thatfalseis the value users need to set to opt back out, rather thantrueto opt in. The chart-driven entry is now skipped if the user already supplies one viaenv.AGNTLOG-126 (helm chart bindings for Auto Multiline V2) is resolved Done via #1764, which only added an
autoMultiLineExtraPatternsbinding and is superseded by this PR for the actual default flip and the env-override fix above.Motivation
V2 auto multi-line detection has been validated with customers (Org2, OpenAI, US Bank) and addresses pain points with the current aggregation strategy. This PR makes it the default.
Review checklist (self-checked)
CHANGELOG.mdis updatedREADME.mdis updated withhelm-docsAdditional Notes
Chart version bumped
3.231.5→3.232.0(minor, per this repo's convention of minor bumps for default-behavior changes affecting all existing users).🤖 Generated with Claude Code