Skip to content

fix(logs): correct metricIncomingLogEvents metric name from IncomingLogs to IncomingLogEvents#37458

Open
syukawa-gh wants to merge 3 commits intoaws:mainfrom
syukawa-gh:fix/logs-metric-incoming-log-events
Open

fix(logs): correct metricIncomingLogEvents metric name from IncomingLogs to IncomingLogEvents#37458
syukawa-gh wants to merge 3 commits intoaws:mainfrom
syukawa-gh:fix/logs-metric-incoming-log-events

Conversation

@syukawa-gh
Copy link
Copy Markdown
Contributor

Issue

Closes #36815

Reason for this change

The metricIncomingLogEvents() method was using 'IncomingLogs' as the metric name, but the correct CloudWatch metric name per AWS documentation is 'IncomingLogEvents'. This caused alarms created with this method to have no datapoints.

Description of changes

Changed the metric name from 'IncomingLogs' to 'IncomingLogEvents' in LogGroup.metricIncomingLogEvents().

Description of how you validated changes

Verified against the AWS CloudWatch Logs metrics documentation.

Checklist

@github-actions github-actions bot added bug This issue is a bug. effort/medium Medium work item – several days of effort p2 labels Apr 1, 2026
@aws-cdk-automation aws-cdk-automation requested a review from a team April 1, 2026 00:26
@github-actions github-actions bot added the admired-contributor [Pilot] contributed between 13-24 PRs to the CDK label Apr 1, 2026
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter fails with the following errors:

❌ Fixes must contain a change to an integration test file and the resulting snapshot.

If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.

✅ A exemption request has been requested. Please wait for a maintainer's review.

…ogs to IncomingLogEvents

The metricIncomingLogEvents() method was using 'IncomingLogs' as the
metric name, but the correct CloudWatch metric name per AWS documentation
is 'IncomingLogEvents'. This caused alarms created with this method to
have no datapoints.

Closes aws#36815
@syukawa-gh syukawa-gh force-pushed the fix/logs-metric-incoming-log-events branch from 77a0c0f to e351e81 Compare April 1, 2026 08:19
@syukawa-gh
Copy link
Copy Markdown
Contributor Author

Exemption Request: This change is a minimal fix that does not alter CloudFormation resource behavior in a way that requires a new integration test. The fix is covered by unit tests.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Apr 1, 2026
@syukawa-gh
Copy link
Copy Markdown
Contributor Author

Exemption Request: This fix corrects the metric name from IncomingLogs to IncomingLogEvents to match the actual CloudWatch metric name. Unit tests are included. Integration test is not applicable as metric helper methods don't produce CloudFormation resources.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
This security report is NOT a review blocker. Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ✅SkippedFailed
Security Guardian Results24 ran24 passed
TestResult
No test annotations available

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
This security report is NOT a review blocker. Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ✅SkippedFailed
Security Guardian Results with resolved templates24 ran24 passed
TestResult
No test annotations available

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

admired-contributor [Pilot] contributed between 13-24 PRs to the CDK bug This issue is a bug. effort/medium Medium work item – several days of effort p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(aws-logs): metricIncomingLogEvents not working

3 participants