Skip to content

feat: add status reporting to CloudWatch#45679

Merged
Kavindu-Dodan merged 7 commits intoelastic:mainfrom
Kavindu-Dodan:feat/cw-status-reporting
Aug 7, 2025
Merged

feat: add status reporting to CloudWatch#45679
Kavindu-Dodan merged 7 commits intoelastic:mainfrom
Kavindu-Dodan:feat/cw-status-reporting

Conversation

@Kavindu-Dodan
Copy link
Contributor

@Kavindu-Dodan Kavindu-Dodan commented Jul 31, 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

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 31, 2025
@github-actions
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@Kavindu-Dodan Kavindu-Dodan added the Team:obs-ds-hosted-services Label for the Observability Hosted Services team label Aug 1, 2025
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 1, 2025
@Kavindu-Dodan Kavindu-Dodan force-pushed the feat/cw-status-reporting branch from 8b74b85 to a7bd411 Compare August 1, 2025 18:49
@Kavindu-Dodan Kavindu-Dodan added backport-8.19 Automated backport to the 8.19 branch backport-9.1 Automated backport to the 9.1 branch labels Aug 1, 2025
@elastic elastic deleted a comment from mergify bot Aug 1, 2025
@Kavindu-Dodan Kavindu-Dodan force-pushed the feat/cw-status-reporting branch 2 times, most recently from 956ecb8 to d4caa4c Compare August 1, 2025 18:57
@Kavindu-Dodan Kavindu-Dodan force-pushed the feat/cw-status-reporting branch from d4caa4c to 16e122b Compare August 1, 2025 19:25
@Kavindu-Dodan Kavindu-Dodan marked this pull request as ready for review August 1, 2025 19:25
@Kavindu-Dodan Kavindu-Dodan requested a review from a team as a code owner August 1, 2025 19:25
@elasticmachine
Copy link
Contributor

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

Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
@Kavindu-Dodan Kavindu-Dodan force-pushed the feat/cw-status-reporting branch from 5b793d6 to e0ebed9 Compare August 5, 2025 14:31
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
@Kavindu-Dodan Kavindu-Dodan force-pushed the feat/cw-status-reporting branch from e0ebed9 to 53215ec Compare August 5, 2025 17:09
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Copy link
Contributor

@taylor-swanson taylor-swanson left a comment

Choose a reason for hiding this comment

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

The status reporting changes LGTM, I'll defer the rest of the review to the codeowners of this input.

@gizas
Copy link
Contributor

gizas commented Aug 7, 2025

Overall functionality is there , great one Kavindu
Some minors

Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
@Kavindu-Dodan Kavindu-Dodan force-pushed the feat/cw-status-reporting branch from 23f9d97 to 11283d0 Compare August 7, 2025 13:40
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Copy link
Contributor

@joecompute joecompute left a comment

Choose a reason for hiding this comment

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

LGTM

@Kavindu-Dodan Kavindu-Dodan merged commit b17bbad into elastic:main Aug 7, 2025
38 of 39 checks passed
mergify bot pushed a commit that referenced this pull request Aug 7, 2025
* 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 bot pushed a commit that referenced this pull request Aug 7, 2025
* 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)
Kavindu-Dodan added a commit that referenced this pull request Aug 7, 2025
* feat: add status reporting to CloudWatch (#45679)

* 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)

* Update CHANGELOG.next.asciidoc

---------

Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Kavindu-Dodan added a commit that referenced this pull request Aug 12, 2025
)

* feat: add status reporting to CloudWatch (#45679)

* 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)

* Update CHANGELOG.next.asciidoc

---------

Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.19 Automated backport to the 8.19 branch backport-9.1 Automated backport to the 9.1 branch Team:obs-ds-hosted-services Label for the Observability Hosted Services team

5 participants