-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(cloudwatch): add id and visible properties for CloudWatch Metric #34870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cloudwatch): add id and visible properties for CloudWatch Metric #34870
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This review is outdated)
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
Build Log is failed. Could you fix it? |
| import { IntegTest } from '@aws-cdk/integ-tests-alpha'; | ||
| import { Dashboard, Metric, GraphWidget } from 'aws-cdk-lib/aws-cloudwatch'; | ||
|
|
||
| class DashboardWithMetricIdAndVisibleIntegrationTest extends Stack { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The integration test is good, but it doesn't demonstrate the primary use case of using the id property with math expressions as described in the issue. Improve the integration test to include a math expression that references metrics by their IDs, which would better validate the actual use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made some changes to include usage of ID of predefined metrics inside math expression.
| }); | ||
| ``` | ||
|
|
||
| ### Metric ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't provide a complete example showing how to use the id property with math expressions, which is the primary use case mentioned in the issue. Expand the documentation to include a complete example showing how to use the id property with math expressions, similar to the use case described in the issue.
| "explanation": "Force lowercasing of RDS Cluster names in CDK" | ||
| }, | ||
| "@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": { | ||
| "recommendedValue": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes seem unrelated to me. Could you check why those fields are added?
| "explanation": "Tighten default KMS key policies" | ||
| }, | ||
| "@aws-cdk/aws-s3:grantWriteWithoutAcl": { | ||
| "recommendedValue": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here. Why this report is added here?
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
ozelalisen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #19876
Reason for this change
Allows setting id and visible for Cloudwatch Metric
Description of changes
Add id and visible in Cloudwatch Metric
Describe any new or updated permissions being added
Description of how you validated changes
Add unit tests and integ test
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license