feat(cloudwatch-dashboards): add support for queryLanguage property#34547
feat(cloudwatch-dashboards): add support for queryLanguage property#34547mergify[bot] merged 14 commits intoaws:mainfrom CDillinger:cw-sql
Conversation
|
Clarification Request: is there any way to view logs to debug the build failure? |
The build logs are posted in the comment from |
|
@kumsmrit thank you for the guidance. The build failure was due to invalid code references I added in the README updates. I have fixed it, and the build is passing now. |
kumsmrit
left a comment
There was a problem hiding this comment.
Thank you for your contribution; I have added a comment.
| * Supported values include: 'Logs', 'SQL', 'PPL' | ||
| * @default - Logs Insights Query Language (default CloudWatch Logs query language) | ||
| */ | ||
| readonly queryLanguage?: string; |
There was a problem hiding this comment.
Can we consider using an enum for the query language options instead of a string. This would provide better type safety and discoverability of available options.
export enum LogQueryLanguage {
LOGS_INSIGHTS = 'Logs',
SQL = 'SQL',
PPL = 'PPL'
}
/* @default LogQueryLanguage.LOGS_INSIGHTS */
readonly queryLanguage?: LogQueryLanguage;
There was a problem hiding this comment.
Thanks, added a commit to incorporate this!
kumsmrit
left a comment
There was a problem hiding this comment.
Thanks for incorporating the feedbacks. I have added few additional comments.
packages/@aws-cdk-testing/framework-integ/test/aws-cloudwatch/test/integ.alarm-and-dashboard.ts
Show resolved
Hide resolved
kumsmrit
left a comment
There was a problem hiding this comment.
Thank you for your contribution!
|
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). |
|
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). |
|
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). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #34482
Reason for this change
CloudWatch recently added support for using multiple query languages to query logs. Currently, CDK is missing the functionality to specify a query language when creating a Log Query Widget inside a CloudWatch Dashboard.
Description of changes
Applied suggested implementation by @ykethan and added tests.
Describe any new or updated permissions being added
N/A
Description of how you validated changes
Added unit test and updated integ test.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license