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
Warning at /realtime-chime-meeting-local-997654549727-us-east-1-rjongbloed/Mon/Dash] Math expression '100 * SEARCH('{AWS/ApiGateway,ApiName,Method,Resource,Stage} ApiName=my-api MetricName=("4XXError" OR "5XXError")', 'Average', 60)' references unknown identifiers: piGateway, piName, ethod, esource, tage, piName, realtime, chime, meeting, local, rjongbloed, etricName, rror, rror, verage. Please add them to the 'usingMetrics' map.
Reproduction Steps
Create a metric using SEARCH function.
Possible Solution
- Parse the complex expression including functions, quotes, parentheses etc.
- Don't do the check if the expression has "SEARCH" or "METRICS" in it.
- Remove the warning completely.
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
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