Skip to content

[8.19](backport #45679) feat: add status reporting to CloudWatch#45842

Merged
Kavindu-Dodan merged 6 commits into8.19from
mergify/bp/8.19/pr-45679
Aug 12, 2025
Merged

[8.19](backport #45679) feat: add status reporting to CloudWatch#45842
Kavindu-Dodan merged 6 commits into8.19from
mergify/bp/8.19/pr-45679

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Aug 7, 2025

Proposed commit message

Adds Status reporting for AWS CloudWatch input. I have introduced following,

  • cwStateReporter : This proxy the status to the actual status reporter. Validate status change from current before conveying status to internal reporter.
  • debugCWStatusReporter: Performs debug logging when context-bound reporter is missing. For example, this happens in standalone mode

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

None - Status reports are utilized by the Agent. In standalone mode, logs are added in Debug level

How to test this PR locally

  • Run standalone filebeat with CloudWatch input & debug logs
  • Observe debug logs with CloudWatch input status updated: prefix for status changes

See below log entries from a standalone run,

Startup and configuration

image

Degraded - network connectivity issue

image

Back to running status

image

Related issues

Fixes #44648


This is an automatic backport of pull request #45679 done by Mergify.

* feat: add status reporting to CloudWatch

Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>

* improve status propagation

Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>

* add changelog entry

Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>

* review: sync for reporting

Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>

* review: add error message for degrading statuses

Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>

* review suggestions

Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>

* improve nil handling in error handling

Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>

---------

Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
(cherry picked from commit b17bbad)
@mergify mergify bot added the backport label Aug 7, 2025
@mergify mergify bot requested a review from a team as a code owner August 7, 2025 18:58
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 7, 2025
@github-actions github-actions bot added the Team:obs-ds-hosted-services Label for the Observability Hosted Services team label Aug 7, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 7, 2025
@Kavindu-Dodan Kavindu-Dodan enabled auto-merge (squash) August 7, 2025 19:23
@mergify
Copy link
Contributor Author

mergify bot commented Aug 8, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b mergify/bp/8.19/pr-45679 upstream/mergify/bp/8.19/pr-45679
git merge upstream/8.19
git push upstream mergify/bp/8.19/pr-45679
@mergify
Copy link
Contributor Author

mergify bot commented Aug 11, 2025

This pull request has not been merged yet. Could you please review and merge it @Kavindu-Dodan? 🙏

@Kavindu-Dodan Kavindu-Dodan merged commit f9950f7 into 8.19 Aug 12, 2025
33 checks passed
@Kavindu-Dodan Kavindu-Dodan deleted the mergify/bp/8.19/pr-45679 branch August 12, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Team:obs-ds-hosted-services Label for the Observability Hosted Services team

2 participants