File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
packages/@aws-cdk/aws-cloudwatch Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ export class Alarm extends AlarmBase {
257257 return dispatchMetric ( metric , {
258258 withStat ( stat , conf ) {
259259 self . validateMetricStat ( stat , metric ) ;
260-
260+ const id = 'm_' + stat . metricName
261261 if ( conf . renderingProperties ?. label == undefined ) {
262262 return dropUndefined ( {
263263 dimensions : stat . dimensions ,
@@ -283,7 +283,7 @@ export class Alarm extends AlarmBase {
283283 stat : stat . statistic ,
284284 unit : stat . unitFilter ,
285285 } ,
286- id : stat . metricName ,
286+ id : id ,
287287 label : conf . renderingProperties ?. label ,
288288 returnData : true ,
289289 } as CfnAlarm . MetricDataQueryProperty ,
Original file line number Diff line number Diff line change 55 "Properties" : {
66 "Metrics" : [
77 {
8- "Id" : " Metric " ,
8+ "Id" : " m_Metric " ,
99 "Label" : " Metric [AVG: ${AVG}]" ,
1010 "MetricStat" : {
1111 "Metric" : {
2828 "Properties" : {
2929 "Metrics" : [
3030 {
31- "Id" : " Metric " ,
31+ "Id" : " m_Metric " ,
3232 "Label" : " Metric [AVG: ${AVG}]" ,
3333 "MetricStat" : {
3434 "Metric" : {
You can’t perform that action at this time.
0 commit comments