Skip to content

Default datadog.logs.autoMultiLineDetection to true - #2841

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 6 commits into
mainfrom
ralph/agtinfr-744-auto-multiline-default-true
Aug 5, 2026
Merged

Default datadog.logs.autoMultiLineDetection to true#2841
gh-worker-dd-mergequeue-cf854d[bot] merged 6 commits into
mainfrom
ralph/agtinfr-744-auto-multiline-default-true

Conversation

@rhy988

@rhy988 rhy988 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Replaces #2801 — re-opened from a branch on DataDog/helm-charts directly (instead of a fork) so CI automation (labeler, chart-version bump/validation) has write access.

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

Also fixes 13 test/datadog/yamlmapper fixtures that relied on the (now-true) Helm default rather than setting datadog.logs.enabled/autoMultiLineDetection explicitly. The Helm-vs-Operator mapper only carries values into the generated DatadogAgent CR when present in the source file, and the Operator only applies any logCollection sub-setting when logCollection.enabled is true — so these fixtures diverged from the Operator's still-false binary default once the Helm chart flipped its own default.

Chart version bumped 3.234.03.235.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 August 5, 2026 14:11
@rhy988
rhy988 requested review from fanny-jiang and removed request for a team August 5, 2026 14:11
@datadog-datadog-us1-prod

This comment has been minimized.

rhy988 added a commit that referenced this pull request Aug 5, 2026

@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: dfb1477226

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

## ref: https://docs.datadoghq.com/agent/logs/advanced_log_collection/?tab=configurationfile#automatic-multi-line-aggregation
autoMultiLineDetection: false
## ref: https://docs.datadoghq.com/agent/logs/auto_multiline_detection/
autoMultiLineDetection: true

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 Preserve auto-multiline default during migration

When users enable log collection but leave datadog.logs.autoMultiLineDetection unset in their values file, this new default makes the Helm-rendered Agent run with DD_LOGS_CONFIG_AUTO_MULTI_LINE_DETECTION=true; however the migration ConfigMap writes only datadog.operator.migration.userValues to the mapper (charts/datadog/templates/migration-values-configmap.yaml), so the unset key is omitted from spec.features.logCollection.autoMultiLineDetection. Since the DatadogAgent CRD does not default that field, those migrated installs fall back to the Operator/Agent default instead of preserving the Helm behavior. Please inject this chart default into the migration path or otherwise normalize the migration values.

Useful? React with 👍 / 👎.

rhy988 added a commit that referenced this pull request Aug 5, 2026
@rhy988
rhy988 force-pushed the ralph/agtinfr-744-auto-multiline-default-true branch from 272720e to 542c694 Compare August 5, 2026 14:20
@github-actions github-actions Bot added the chart/datadog This issue or pull request is related to the datadog chart label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ GKE Autopilot / GDC Baseline Manifests Changed

This PR modifies GKE Autopilot or GDC baseline manifest snapshots. Before merging, confirm:

  • GKE Autopilot/GKE GDC baseline manifest diffs have been reviewed and confirmed to be supported in GKE Autopilot and the latest Datadog WorkloadAllowlist.

If changes introduce constraints not yet covered by the Datadog WorkloadAllowlist CR, gate them with {{- if not (or .Values.providers.gke.autopilot .Values.providers.gke.gdc) }} until the WorkloadAllowlist is updated.
See gke-constraints-review-guide.md for the full constraint reference.

@fanny-jiang
fanny-jiang requested a review from raymondeah August 5, 2026 15:22
@raymondeah

Copy link
Copy Markdown
Contributor

@codex review

@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: 542c694e06

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

## ref: https://docs.datadoghq.com/agent/logs/advanced_log_collection/?tab=configurationfile#automatic-multi-line-aggregation
autoMultiLineDetection: false
## ref: https://docs.datadoghq.com/agent/logs/auto_multiline_detection/
autoMultiLineDetection: true

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 Keep auto multiline opt-in for upgrades

For upgrades where users left this value unset, this flips log aggregation from false to true immediately on helm upgrade, so existing installs silently opt in to the new behavior. The datadog chart review guidance treats stable default changes as upgrade-breaking unless they ship with a deprecation/migration path or a major-version boundary; a minor bump plus changelog opt-out still changes running installs that do not already pin this value. Please keep the default stable until a major release, or add an upgrade-safe compatibility path.

AGENTS.md reference: AGENTS.md:L7-L7

Useful? React with 👍 / 👎.

rhy988 added 6 commits August 5, 2026 14:55
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.
Mirrors the existing Operator-enabled-by-default and registryMigrationMode
notices: explains the change at helm install/upgrade time and gives the
exact command to opt out.
@rhy988
rhy988 force-pushed the ralph/agtinfr-744-auto-multiline-default-true branch from 542c694 to 2f7b48b Compare August 5, 2026 18:58
@rhy988

rhy988 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Aug 5, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-08-05 20:27:51 UTC ℹ️ Start processing command /merge


2026-08-05 20:27:59 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 49m (p90).


2026-08-05 21:01:10 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the ralph/agtinfr-744-auto-multiline-default-true branch August 5, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chart/datadog This issue or pull request is related to the datadog chart mergequeue-status: done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants