Log data stream config notices once per stream instead of per document#6979
Open
nsa-softpay wants to merge 1 commit into
Open
Conversation
The opensearch sink logs configuration notices for data streams (first-write-wins document_id, unsupported routing, and action coercion to `create`) inside determineAction, which runs once per event. On high-volume pipelines this emits one WARN per ingested document, dominating log output. These notices describe configured, expected behavior rather than a per-record fault, so dedupe them by (data stream, notice type) and log each at most once per data stream. The returned action is unchanged. Resolves opensearch-project#6972 Signed-off-by: nsa-softpay <nsa@softpay.io>
nsa-softpay
requested review from
KarstenSchnitter,
Zhangxunmt,
dinujoh,
divbok,
dlvenable,
graytaylor0,
kkondaka,
oeyh,
san81,
sb2k16,
srikanthjg and
srikanthpadakanti
as code owners
July 4, 2026 06:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The opensearch sink logs configuration notices for data streams inside
DataStreamIndex, which is reached fromEventActionResolver.resolveActiononce per event. As a result these notices are emitted once per ingested document at WARN:document_idis configuredcreateaction tocreateOn a high-volume pipeline this produces one WARN line per document (e.g. ~190M/day), which dominates log output and drowns out genuine warnings and errors, while describing configured, expected behavior rather than a per-record fault.
This change dedupes the notices by
(data stream, notice type)using aConcurrentHashMap-backed set so each notice is logged at most once per data stream while preserving the informational intent. The action returned bydetermineActionis unchanged.Issues Resolved
Resolves #6972
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.