[8.19](backport #43251) feat: Introduce lastSync start position to AWS CloudWatch input backed by state registry#44736
Merged
Kavindu-Dodan merged 3 commits into8.19from Jun 11, 2025
Merged
Conversation
…d by state registry (#43251) * add state registry support for cloudwatch input Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> finalize AWS CW lastSync start position usage Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> update changelog next Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> review changes Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> review changes - improve state store id, fix timestamp and return nil for error Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> documentation update with md migration Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> # Conflicts: # x-pack/filebeat/input/awscloudwatch/config.go * review change: use ackers for confirmed delivery prior to saving state Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * review: documentation updates Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * review changes : ctx handling, shutdown improvement and race condition handling Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * review : fix ctx condition Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> (cherry picked from commit 42e50cf) # Conflicts: # docs/reference/filebeat/filebeat-input-aws-cloudwatch.md
Contributor
Author
|
Cherry-pick of 42e50cf has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Contributor
|
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
Contributor
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
9af93ff to
8ed39cb
Compare
Kavindu-Dodan
approved these changes
Jun 10, 2025
Contributor
Kavindu-Dodan
left a comment
There was a problem hiding this comment.
Fixed Change Log conflicts and documentation upgrades.
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.
Proposed commit message
Introduce
lastSyncoption to AWS CloudWatch input'sstart_positionconfiguration. This feature utilizes the state registry, which with this update stores the last successful sync timestamp under thelast_sync_epochkey.start_positionconfiguration by default usesbeginningoption. This can cause data duplications when restarting filebeats or migrating it to a newer version. Users can avoid such data duplocates by utilizinglastSyncoption for thestart_positionconfiguration while targeting beats to use the same registry location.Acknowledgement backed state updates
After the initial review, the need for acknowledgments prior to the state registry update was identified thanks to this remark - #43251 (comment)
Based on this feedback, I have implemented the state registry update with following component interactions,
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Disruptive User Impact
None -
start_positionby default usebeginning. So this new option is an opt-in feature.Screenshots
Example
filebeat.ymlconfiguration,Example state entries with last sync timestamp updates,
This is an automatic backport of pull request #43251 done by [Mergify](https://mergify.com).