-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
cloudwatch metrics: expression warning too simplistic #20136
cloudwatch metrics: expression warning too simplistic #20136
Comments
For reference, the warnings were added in #19825. |
I understand why IDs generation is useful, but are "non-existing identifiers" warnings that useful? If we cannot do proper AST analysis for expressions, maybe we should revert that regexp-based solution? @rix0rrr |
Curious, would it be better just to have a new SearchExpression instead of overloading MathExpression? |
As far as I understand, expressions can be complex, like |
Does anybody know if there is at least a way to suppress these specific warning somehow? (E.g. judging by this issue #15079 it's currently not supported, especially with Java where |
I would revert this feature, TBH. Its implementation did not take into account some scenarios. |
Hi, I see this issue has been assigned and the priority increased, but May 2022 was the last update. Is there a rough ETA for when this might be picked up? |
…etrics (#24313) Closes [#20136](#20136). It is intended that all metric identifiers referenced in a MathExpression are included in the usingMetrics map and we will raise warnings if the customer does not follow this contract. However for SEARCH and METRICS queries, we can refer directly to metrics attribute values inside the query. Therefore we should not raise warnings. Change made based on work done in 55108b9 with regex extended to a few other expressions. Looks like integ requests will not be required based on that commit. I had some firsthand experience getting thousands of this warning message after upgrading to CDK 2 and decided it would be easier to fix than suppress the excessive warnings. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…etrics (aws#24313) Closes [aws#20136](aws#20136). It is intended that all metric identifiers referenced in a MathExpression are included in the usingMetrics map and we will raise warnings if the customer does not follow this contract. However for SEARCH and METRICS queries, we can refer directly to metrics attribute values inside the query. Therefore we should not raise warnings. Change made based on work done in aws@55108b9 with regex extended to a few other expressions. Looks like integ requests will not be required based on that commit. I had some firsthand experience getting thousands of this warning message after upgrading to CDK 2 and decided it would be easier to fix than suppress the excessive warnings. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…etrics (aws#24313) Closes [aws#20136](aws#20136). It is intended that all metric identifiers referenced in a MathExpression are included in the usingMetrics map and we will raise warnings if the customer does not follow this contract. However for SEARCH and METRICS queries, we can refer directly to metrics attribute values inside the query. Therefore we should not raise warnings. Change made based on work done in aws@55108b9 with regex extended to a few other expressions. Looks like integ requests will not be required based on that commit. I had some firsthand experience getting thousands of this warning message after upgrading to CDK 2 and decided it would be easier to fix than suppress the excessive warnings. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the bug
CDK displays a warning for metrics expressions that are valid.
Specifically, it is trying to check that all variables used in the expression are defined, bit it does not deal with the SEARCH function, and likely not the METRICS either.
Expected Behavior
Not display a warning for valid expressions.
Current Behavior
Reproduction Steps
Create a metric using SEARCH function.
Possible Solution
Additional Information/Context
No response
CDK CLI Version
2.22.0 (build 1db4b16)
Framework Version
1.153.1
Node.js Version
v16.15.0
OS
MacOS
Language
Typescript, Python
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: