Skip to content

Default datadog.logs.autoMultiLineDetection to true - #2801

Closed
rhy988 wants to merge 4 commits into
DataDog:mainfrom
rhy988:ralph/agtinfr-744-auto-multiline-default-true
Closed

Default datadog.logs.autoMultiLineDetection to true#2801
rhy988 wants to merge 4 commits into
DataDog:mainfrom
rhy988:ralph/agtinfr-744-auto-multiline-default-true

Conversation

@rhy988

@rhy988 rhy988 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Flips the default of datadog.logs.autoMultiLineDetection from false to true. 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_DETECTION was rendered twice with conflicting values whenever a manual agents.containers.agent.env entry set the same variable that datadog.logs.autoMultiLineDetection also sets. This bug becomes much more visible now that false is the value users need to set to opt back out, rather than true to opt in. The chart-driven entry is now skipped if the user already supplies one via env.

AGNTLOG-126 (helm chart bindings for Auto Multiline V2) is resolved Done via #1764, which only added an autoMultiLineExtraPatterns binding 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)

  • PR has a meaningful title and adequate description
  • Change is compatible with support policy for older Helm charts
  • Tests were added
  • Documentation is up to date
  • CHANGELOG.md is updated
  • README.md is updated with helm-docs

Additional Notes

Chart version bumped 3.231.53.232.0 (minor, per this repo's convention of minor bumps for default-behavior changes affecting all existing users).

🤖 Generated with Claude Code

@rhy988
rhy988 requested review from a team as code owners July 20, 2026 05:20
@rhy988
rhy988 requested review from ddogDiegoGonzalez and removed request for a team July 20, 2026 05:20

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment on lines +153 to +157
{{- range .Values.agents.containers.agent.env }}
{{- if eq .name "DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION" }}
{{- $autoMultiLineOverridden = true }}
{{- end }}
{{- end }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@rhy988
rhy988 marked this pull request as draft July 20, 2026 05:43
@rhy988
rhy988 force-pushed the ralph/agtinfr-744-auto-multiline-default-true branch from 71a39d5 to 4f8ff55 Compare July 27, 2026 20:06
@rhy988
rhy988 requested review from a team and Copilot and removed request for a team July 28, 2026 15:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.autoMultiLineDetection to true (and update the associated docs link).
  • Prevent duplicate DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION env var rendering when the user already sets it via datadog.env/envDict or agents.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.

Comment on lines +152 to +165
{{- $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 }}
@rhy988
rhy988 requested a review from soberpeach July 28, 2026 19:12
@rhy988
rhy988 marked this pull request as ready for review July 28, 2026 19:12
rhy988 added 4 commits August 4, 2026 12:41
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.
@rhy988
rhy988 force-pushed the ralph/agtinfr-744-auto-multiline-default-true branch from b9b2c3d to dfb1477 Compare August 4, 2026 16:42
@rhy988

rhy988 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Replaced by #2841, re-opened from a branch on DataDog/helm-charts directly (instead of a fork) so CI automation (labeler, chart-version bump/validation) can run with write access.

@rhy988 rhy988 closed this Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants