From fb22a52c31d4e69bc7145e64a5140bfa698ae6e8 Mon Sep 17 00:00:00 2001 From: cdklabs-automation <90142015+cdklabs-automation@users.noreply.github.com> Date: Sun, 27 Oct 2024 17:31:21 -0700 Subject: [PATCH 1/5] chore(deps): upgrade dependencies (#585) Upgrades project dependencies. See details in [workflow run]. [Workflow Run]: https://github.com/cdklabs/cdk-monitoring-constructs/actions/runs/11545102154 ------ *Automatically created by projen via the "upgrade-main" workflow* --- yarn.lock | 349 +++++++++++++++++++++++++----------------------------- 1 file changed, 163 insertions(+), 186 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2028923c..cdade6c3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11,9 +11,9 @@ "@jridgewell/trace-mapping" "^0.3.24" "@aws-cdk/asset-awscli-v1@^2.2.201": - version "2.2.207" - resolved "https://registry.yarnpkg.com/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.207.tgz#c145967f88db58065369929084a39629c6f99306" - integrity sha512-5oRh5Ad7hGSqwM3+/X8MmIkUjBMGU9sd1g+pa3L0s8IL15OQcFW0ZT0gsUdEb/N/JV663jUUpSbtD7pLO65O4Q== + version "2.2.208" + resolved "https://registry.yarnpkg.com/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.208.tgz#1675c6ba6061c0541ad0d258b42f0101d5ee10cf" + integrity sha512-r4CuHZaiBioU6waWhCNdEL4MO1+rfbcYVS/Ndz1XNGB5cxIRZwAS0Si6qD2D6nsgpPojiruFl67T1t5M9Va8kQ== "@aws-cdk/asset-kubectl-v20@^2.1.2": version "2.1.3" @@ -30,131 +30,114 @@ resolved "https://registry.yarnpkg.com/@aws-cdk/aws-redshift-alpha/-/aws-redshift-alpha-2.112.0-alpha.0.tgz#225dedf9fe860f049ec7f52214b0fbdae83ba449" integrity sha512-vxGq1c/JPzJ9TT9Io222oE4WvjDQBuITOylVVDsWPCNXH8Detu147e5w6SfzIEESRwAlXwcgEonRb+arlMRplQ== -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.25.7": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.25.7.tgz#438f2c524071531d643c6f0188e1e28f130cebc7" - integrity sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.0.tgz#9374b5cd068d128dac0b94ff482594273b1c2815" + integrity sha512-INCKxTtbXtcNbUZ3YXutwMpEleqttcswhAdee7dhuoVrD2cnuc3PqtERBtxkX5nziX9vnBL8WXmSGwv8CuPV6g== dependencies: - "@babel/highlight" "^7.25.7" + "@babel/helper-validator-identifier" "^7.25.9" + js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/compat-data@^7.25.7": - version "7.25.8" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.8.tgz#0376e83df5ab0eb0da18885c0140041f0747a402" - integrity sha512-ZsysZyXY4Tlx+Q53XdnOFmqwfB9QDTHYxaZYajWRoBLuLEAwI2UIbtxOjWh/cFaa9IKUlcB+DDuoskLuKu56JA== +"@babel/compat-data@^7.25.9": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.0.tgz#f02ba6d34e88fadd5e8861e8b38902f43cc1c819" + integrity sha512-qETICbZSLe7uXv9VE8T/RWOdIE5qqyTucOt4zLYMafj2MRO271VGgLd4RACJMeBO37UPWhXiKMBk7YlJ0fOzQA== "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0": - version "7.25.8" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.8.tgz#a57137d2a51bbcffcfaeba43cb4dd33ae3e0e1c6" - integrity sha512-Oixnb+DzmRT30qu9d3tJSQkxuygWm32DFykT4bRoORPa9hZ/L4KhVB/XiRm6KG+roIEM7DBQlmg27kw2HZkdZg== + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.26.0.tgz#d78b6023cc8f3114ccf049eb219613f74a747b40" + integrity sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg== dependencies: "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.25.7" - "@babel/generator" "^7.25.7" - "@babel/helper-compilation-targets" "^7.25.7" - "@babel/helper-module-transforms" "^7.25.7" - "@babel/helpers" "^7.25.7" - "@babel/parser" "^7.25.8" - "@babel/template" "^7.25.7" - "@babel/traverse" "^7.25.7" - "@babel/types" "^7.25.8" + "@babel/code-frame" "^7.26.0" + "@babel/generator" "^7.26.0" + "@babel/helper-compilation-targets" "^7.25.9" + "@babel/helper-module-transforms" "^7.26.0" + "@babel/helpers" "^7.26.0" + "@babel/parser" "^7.26.0" + "@babel/template" "^7.25.9" + "@babel/traverse" "^7.25.9" + "@babel/types" "^7.26.0" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.25.7", "@babel/generator@^7.7.2": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.7.tgz#de86acbeb975a3e11ee92dd52223e6b03b479c56" - integrity sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA== +"@babel/generator@^7.25.9", "@babel/generator@^7.26.0", "@babel/generator@^7.7.2": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.0.tgz#505cc7c90d92513f458a477e5ef0703e7c91b8d7" + integrity sha512-/AIkAmInnWwgEAJGQr9vY0c66Mj6kjkE2ZPB1PurTRaRAh3U+J45sAQMjQDJdh4WbR3l0x5xkimXBKyBXXAu2w== dependencies: - "@babel/types" "^7.25.7" + "@babel/parser" "^7.26.0" + "@babel/types" "^7.26.0" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" -"@babel/helper-compilation-targets@^7.25.7": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.7.tgz#11260ac3322dda0ef53edfae6e97b961449f5fa4" - integrity sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A== +"@babel/helper-compilation-targets@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz#55af025ce365be3cdc0c1c1e56c6af617ce88875" + integrity sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ== dependencies: - "@babel/compat-data" "^7.25.7" - "@babel/helper-validator-option" "^7.25.7" + "@babel/compat-data" "^7.25.9" + "@babel/helper-validator-option" "^7.25.9" browserslist "^4.24.0" lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-module-imports@^7.25.7": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.25.7.tgz#dba00d9523539152906ba49263e36d7261040472" - integrity sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw== - dependencies: - "@babel/traverse" "^7.25.7" - "@babel/types" "^7.25.7" - -"@babel/helper-module-transforms@^7.25.7": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.25.7.tgz#2ac9372c5e001b19bc62f1fe7d96a18cb0901d1a" - integrity sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ== - dependencies: - "@babel/helper-module-imports" "^7.25.7" - "@babel/helper-simple-access" "^7.25.7" - "@babel/helper-validator-identifier" "^7.25.7" - "@babel/traverse" "^7.25.7" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.25.7", "@babel/helper-plugin-utils@^7.8.0": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.7.tgz#8ec5b21812d992e1ef88a9b068260537b6f0e36c" - integrity sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw== - -"@babel/helper-simple-access@^7.25.7": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.25.7.tgz#5eb9f6a60c5d6b2e0f76057004f8dacbddfae1c0" - integrity sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ== - dependencies: - "@babel/traverse" "^7.25.7" - "@babel/types" "^7.25.7" - -"@babel/helper-string-parser@^7.25.7": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz#d50e8d37b1176207b4fe9acedec386c565a44a54" - integrity sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g== - -"@babel/helper-validator-identifier@^7.25.7": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz#77b7f60c40b15c97df735b38a66ba1d7c3e93da5" - integrity sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg== - -"@babel/helper-validator-option@^7.25.7": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.25.7.tgz#97d1d684448228b30b506d90cace495d6f492729" - integrity sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ== - -"@babel/helpers@^7.25.7": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.7.tgz#091b52cb697a171fe0136ab62e54e407211f09c2" - integrity sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA== - dependencies: - "@babel/template" "^7.25.7" - "@babel/types" "^7.25.7" - -"@babel/highlight@^7.25.7": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.25.7.tgz#20383b5f442aa606e7b5e3043b0b1aafe9f37de5" - integrity sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw== - dependencies: - "@babel/helper-validator-identifier" "^7.25.7" - chalk "^2.4.2" - js-tokens "^4.0.0" - picocolors "^1.0.0" +"@babel/helper-module-imports@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz#e7f8d20602ebdbf9ebbea0a0751fb0f2a4141715" + integrity sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw== + dependencies: + "@babel/traverse" "^7.25.9" + "@babel/types" "^7.25.9" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.25.7", "@babel/parser@^7.25.8": - version "7.25.8" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.8.tgz#f6aaf38e80c36129460c1657c0762db584c9d5e2" - integrity sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ== +"@babel/helper-module-transforms@^7.26.0": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz#8ce54ec9d592695e58d84cd884b7b5c6a2fdeeae" + integrity sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw== dependencies: - "@babel/types" "^7.25.8" + "@babel/helper-module-imports" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" + "@babel/traverse" "^7.25.9" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.25.9", "@babel/helper-plugin-utils@^7.8.0": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz#9cbdd63a9443a2c92a725cca7ebca12cc8dd9f46" + integrity sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw== + +"@babel/helper-string-parser@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz#1aabb72ee72ed35789b4bbcad3ca2862ce614e8c" + integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA== + +"@babel/helper-validator-identifier@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7" + integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== + +"@babel/helper-validator-option@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz#86e45bd8a49ab7e03f276577f96179653d41da72" + integrity sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw== + +"@babel/helpers@^7.26.0": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.26.0.tgz#30e621f1eba5aa45fe6f4868d2e9154d884119a4" + integrity sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw== + dependencies: + "@babel/template" "^7.25.9" + "@babel/types" "^7.26.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0": + version "7.26.1" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.1.tgz#44e02499960df2cdce2c456372a3e8e0c3c5c975" + integrity sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw== + dependencies: + "@babel/types" "^7.26.0" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -185,11 +168,11 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-import-attributes@^7.24.7": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.7.tgz#d78dd0499d30df19a598e63ab895e21b909bc43f" - integrity sha512-AqVo+dguCgmpi/3mYBdu9lkngOBlQ2w2vnNpa6gfiCxQZLzV4ZbhsXitJ2Yblkoe1VQwtHSaNmIaGll/26YWRw== + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz#3b1412847699eea739b4f2602c74ce36f6b0b0f7" + integrity sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A== dependencies: - "@babel/helper-plugin-utils" "^7.25.7" + "@babel/helper-plugin-utils" "^7.25.9" "@babel/plugin-syntax-import-meta@^7.10.4": version "7.10.4" @@ -262,42 +245,41 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.7.2": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.7.tgz#bfc05b0cc31ebd8af09964650cee723bb228108b" - integrity sha512-rR+5FDjpCHqqZN2bzZm18bVYGaejGq5ZkpVCJLXor/+zlSrSoc4KWcHI0URVWjl/68Dyr1uwZUz/1njycEAv9g== - dependencies: - "@babel/helper-plugin-utils" "^7.25.7" - -"@babel/template@^7.25.7", "@babel/template@^7.3.3": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.7.tgz#27f69ce382855d915b14ab0fe5fb4cbf88fa0769" - integrity sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA== - dependencies: - "@babel/code-frame" "^7.25.7" - "@babel/parser" "^7.25.7" - "@babel/types" "^7.25.7" - -"@babel/traverse@^7.25.7", "@babel/traverse@^7.7.2": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.7.tgz#83e367619be1cab8e4f2892ef30ba04c26a40fa8" - integrity sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg== - dependencies: - "@babel/code-frame" "^7.25.7" - "@babel/generator" "^7.25.7" - "@babel/parser" "^7.25.7" - "@babel/template" "^7.25.7" - "@babel/types" "^7.25.7" + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz#67dda2b74da43727cf21d46cf9afef23f4365399" + integrity sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/template@^7.25.9", "@babel/template@^7.3.3": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.9.tgz#ecb62d81a8a6f5dc5fe8abfc3901fc52ddf15016" + integrity sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg== + dependencies: + "@babel/code-frame" "^7.25.9" + "@babel/parser" "^7.25.9" + "@babel/types" "^7.25.9" + +"@babel/traverse@^7.25.9", "@babel/traverse@^7.7.2": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.9.tgz#a50f8fe49e7f69f53de5bea7e413cd35c5e13c84" + integrity sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw== + dependencies: + "@babel/code-frame" "^7.25.9" + "@babel/generator" "^7.25.9" + "@babel/parser" "^7.25.9" + "@babel/template" "^7.25.9" + "@babel/types" "^7.25.9" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.7", "@babel/types@^7.25.8", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.25.8" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.8.tgz#5cf6037258e8a9bcad533f4979025140cb9993e1" - integrity sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.0.tgz#deabd08d6b753bc8e0f198f8709fb575e31774ff" + integrity sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA== dependencies: - "@babel/helper-string-parser" "^7.25.7" - "@babel/helper-validator-identifier" "^7.25.7" - to-fast-properties "^2.0.0" + "@babel/helper-string-parser" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" "@balena/dockerignore@^1.0.2": version "1.0.2" @@ -317,16 +299,16 @@ "@jridgewell/trace-mapping" "0.3.9" "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" - integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + version "4.4.1" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz#d1145bf2c20132d6400495d6df4bf59362fd9d56" + integrity sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA== dependencies: - eslint-visitor-keys "^3.3.0" + eslint-visitor-keys "^3.4.3" "@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1": - version "4.11.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.1.tgz#a547badfc719eb3e5f4b556325e542fbe9d7a18f" - integrity sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q== + version "4.12.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.0.tgz#1b8e62d1244557927b9a7fc7a96e5bbd62e1870e" + integrity sha512-gh7PdNombP8ftL8TinYC8Xd7WEypB8EKV4PI2h0eMzndKjPCXuo2zUiZtD2Hu+MSPt02Ty2MdS788ADl9ai1rA== "@eslint/eslintrc@^2.1.4": version "2.1.4" @@ -789,11 +771,11 @@ integrity sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag== "@types/node@*": - version "22.7.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.7.tgz#6cd9541c3dccb4f7e8b141b491443f4a1570e307" - integrity sha512-SRxCrrg9CL/y54aiMCG3edPKdprgMVGDXjA3gB8UmmBW5TcXzRUYAh8EWzTnSJFAd1rgImPELza+A3bJ+qxz8Q== + version "22.8.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.8.1.tgz#b39d4b98165e2ae792ce213f610c7c6108ccfa16" + integrity sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg== dependencies: - undici-types "~6.19.2" + undici-types "~6.19.8" "@types/node@^16 <= 16.18.78": version "16.18.78" @@ -962,9 +944,9 @@ acorn@^7.1.1: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.11.0, acorn@^8.2.4, acorn@^8.4.1, acorn@^8.9.0: - version "8.13.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.13.0.tgz#2a30d670818ad16ddd6a35d3842dacec9e5d7ca3" - integrity sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w== + version "8.14.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" + integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== add-stream@^1.0.0: version "1.0.0" @@ -1280,14 +1262,14 @@ browser-process-hrtime@^1.0.0: integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== browserslist@^4.24.0: - version "4.24.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.0.tgz#a1325fe4bc80b64fda169629fc01b3d6cecd38d4" - integrity sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A== + version "4.24.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.2.tgz#f5845bc91069dbd55ee89faf9822e1d885d16580" + integrity sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg== dependencies: - caniuse-lite "^1.0.30001663" - electron-to-chromium "^1.5.28" + caniuse-lite "^1.0.30001669" + electron-to-chromium "^1.5.41" node-releases "^2.0.18" - update-browserslist-db "^1.1.0" + update-browserslist-db "^1.1.1" bs-logger@0.x: version "0.2.6" @@ -1343,10 +1325,10 @@ camelcase@^6.2.0, camelcase@^6.3.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001663: - version "1.0.30001669" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001669.tgz#fda8f1d29a8bfdc42de0c170d7f34a9cf19ed7a3" - integrity sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w== +caniuse-lite@^1.0.30001669: + version "1.0.30001673" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001673.tgz#5aa291557af1c71340e809987367410aab7a5a9e" + integrity sha512-WTrjUCSMp3LYX0nE12ECkV0a+e6LC85E0Auz75555/qr78Oc8YWhEPNfDd6SHdtlCMSzqtuXY0uyEMNRcsKpKw== case@1.6.3, case@^1.6.3: version "1.6.3" @@ -1932,10 +1914,10 @@ dotgitignore@^2.1.0: find-up "^3.0.0" minimatch "^3.0.4" -electron-to-chromium@^1.5.28: - version "1.5.41" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.41.tgz#eae1ba6c49a1a61d84cf8263351d3513b2bcc534" - integrity sha512-dfdv/2xNjX0P8Vzme4cfzHqnPm5xsZXwsolTYr0eyW18IUmNyG08vL+fttvinTfhKfIKdRoqkDIC9e9iWQCNYQ== +electron-to-chromium@^1.5.41: + version "1.5.47" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.47.tgz#ef0751bc19b28be8ee44cd8405309de3bf3b20c7" + integrity sha512-zS5Yer0MOYw4rtK2iq43cJagHZ8sXN0jDHDKzB+86gSBSAI4v07S97mcq+Gs2vclAxSh1j7vOAHxSVgduiiuVQ== emittery@^0.8.1: version "0.8.1" @@ -2163,7 +2145,7 @@ eslint-scope@^7.2.2: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: +eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== @@ -4839,9 +4821,9 @@ stream-chain@^2.2.5: integrity sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA== stream-json@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/stream-json/-/stream-json-1.8.0.tgz#53f486b2e3b4496c506131f8d7260ba42def151c" - integrity sha512-HZfXngYHUAr1exT4fxlbc1IOce1RYxp2ldeaf97LYCOPSoOqY/1Psp7iGvpb+6JIOgkra9zDYnPX01hGAHzEPw== + version "1.9.0" + resolved "https://registry.yarnpkg.com/stream-json/-/stream-json-1.9.0.tgz#caae36fd9fff99662f504dce859bc855d5668282" + integrity sha512-TqnfW7hRTKje7UobBzXZJ2qOEDJvdcSVgVIK/fopC03xINFuFqQs8RVjyDT4ry7TmOo2ueAXwpXXXG4tNgtvoQ== dependencies: stream-chain "^2.2.5" @@ -5042,28 +5024,23 @@ through@2, "through@>=2.2.7 <3": resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -tldts-core@^6.1.52: - version "6.1.52" - resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-6.1.52.tgz#8e9f041a48396b720aa395f5c2004ed6bb1c340a" - integrity sha512-j4OxQI5rc1Ve/4m/9o2WhWSC4jGc4uVbCINdOEJRAraCi0YqTqgMcxUx7DbmuP0G3PCixoof/RZB0Q5Kh9tagw== +tldts-core@^6.1.56: + version "6.1.56" + resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-6.1.56.tgz#6996d6f97172920aceedb9fadaa85a691e911332" + integrity sha512-Ihxv/Bwiyj73icTYVgBUkQ3wstlCglLoegSgl64oSrGUBX1hc7Qmf/CnrnJLaQdZrCnTaLqMYOwKMKlkfkFrxQ== tldts@^6.1.32: - version "6.1.52" - resolved "https://registry.yarnpkg.com/tldts/-/tldts-6.1.52.tgz#5b4e1bf9a81b0450a64d7c8fbca49bbd12e6a1cf" - integrity sha512-fgrDJXDjbAverY6XnIt0lNfv8A0cf7maTEaZxNykLGsLG7XP+5xhjBTrt/ieAsFjAlZ+G5nmXomLcZDkxXnDzw== + version "6.1.56" + resolved "https://registry.yarnpkg.com/tldts/-/tldts-6.1.56.tgz#c425d343418a9c66db1197998559b828822bb9ec" + integrity sha512-2PT1oRZCxtsbLi5R2SQjE/v4vvgRggAtVcYj+3Rrcnu2nPZvu7m64+gDa/EsVSWd3QzEc0U0xN+rbEKsJC47kA== dependencies: - tldts-core "^6.1.52" + tldts-core "^6.1.56" tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -5273,7 +5250,7 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~6.19.2: +undici-types@~6.19.8: version "6.19.8" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== @@ -5293,7 +5270,7 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== -update-browserslist-db@^1.1.0: +update-browserslist-db@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz#80846fba1d79e82547fb661f8d141e0945755fe5" integrity sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A== From 1eff500507cb0cdec7f687d7fd196562adca2170 Mon Sep 17 00:00:00 2001 From: Sajid Anwar <168222561+sajidanw@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:06:46 -0600 Subject: [PATCH 2/5] fix: Allow non-integral latency thresholds and durations (#587) Fixes #586. Adds the `integral: false` option to [`Duration.toMillisecond()`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Duration.html#towbrmillisecondsopts) calls to allow the original non-integral/sub-millisecond threshold values to be provided to CloudWatch. These four lines are the only uses of `toMilliseconds` in the package. I also created a new test for the `LatencyAlarmFactory` class to test these specific cases. To verify that they were working, I ran the tests without the fix in place and got the expected error messages: [gist](https://gist.github.com/sajidanw/37fd1ddd63ff763a911bb3a1cf58b2b8). --- _By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license_ --- .../monitoring/alarms/LatencyAlarmFactory.ts | 8 +-- test/common/alarm/LatencyAlarmFactory.test.ts | 67 +++++++++++++++++++ 2 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 test/common/alarm/LatencyAlarmFactory.test.ts diff --git a/lib/common/monitoring/alarms/LatencyAlarmFactory.ts b/lib/common/monitoring/alarms/LatencyAlarmFactory.ts index 4753e5bd..04cf9a03 100644 --- a/lib/common/monitoring/alarms/LatencyAlarmFactory.ts +++ b/lib/common/monitoring/alarms/LatencyAlarmFactory.ts @@ -166,7 +166,7 @@ export class LatencyAlarmFactory { ComparisonOperator.GREATER_THAN_THRESHOLD, ...props, disambiguator, - threshold: props.maxLatency.toMilliseconds(), + threshold: props.maxLatency.toMilliseconds({ integral: false }), alarmNameSuffix, // we will dedupe any kind of latency issue to the same ticket alarmDedupeStringSuffix: this.alarmFactory @@ -200,7 +200,7 @@ export class LatencyAlarmFactory { ComparisonOperator.GREATER_THAN_THRESHOLD, ...props, disambiguator, - threshold: props.maxLatency.toMilliseconds(), + threshold: props.maxLatency.toMilliseconds({ integral: false }), alarmNameSuffix, // we will dedupe any kind of latency issue to the same alarm alarmDedupeStringSuffix: this.alarmFactory @@ -230,7 +230,7 @@ export class LatencyAlarmFactory { ComparisonOperator.GREATER_THAN_THRESHOLD, ...props, disambiguator, - threshold: props.maxDuration.toMilliseconds(), + threshold: props.maxDuration.toMilliseconds({ integral: false }), alarmNameSuffix, // we will dedupe any kind of latency issue to the same ticket alarmDedupeStringSuffix: this.alarmFactory @@ -264,7 +264,7 @@ export class LatencyAlarmFactory { ComparisonOperator.GREATER_THAN_THRESHOLD, ...props, disambiguator, - threshold: props.maxDuration.toMilliseconds(), + threshold: props.maxDuration.toMilliseconds({ integral: false }), alarmNameSuffix, // we will dedupe any kind of latency issue to the same ticket alarmDedupeStringSuffix: this.alarmFactory diff --git a/test/common/alarm/LatencyAlarmFactory.test.ts b/test/common/alarm/LatencyAlarmFactory.test.ts new file mode 100644 index 00000000..a17c92c1 --- /dev/null +++ b/test/common/alarm/LatencyAlarmFactory.test.ts @@ -0,0 +1,67 @@ +import { Duration, Stack } from "aws-cdk-lib"; +import { Metric } from "aws-cdk-lib/aws-cloudwatch"; +import { Construct } from "constructs"; + +import { + AlarmFactory, + AlarmFactoryDefaults, + LatencyAlarmFactory, + LatencyType, + MetricFactoryDefaults, + noopAction, +} from "../../../lib"; + +const stack = new Stack(); +const construct = new Construct(stack, "SampleConstruct"); + +const globalMetricDefaults: MetricFactoryDefaults = { + namespace: "DummyNamespace", +}; +const globalAlarmDefaults: AlarmFactoryDefaults = { + alarmNamePrefix: "DummyServiceAlarms", + actionsEnabled: true, + datapointsToAlarm: 6, + // we do not care about alarm actions in this test + action: noopAction(), +}; +const factory = new AlarmFactory(construct, { + globalMetricDefaults, + globalAlarmDefaults, + localAlarmNamePrefix: "prefix", +}); + +const metric = new Metric({ + metricName: "DummyMetric1", + namespace: "DummyCustomNamespace", + dimensionsMap: { CustomDimension: "CustomDimensionValue" }, +}); + +const latencyAlarmFactory = new LatencyAlarmFactory(factory); + +test("addLatencyAlarm: non-integral millisecond thresholds do not throw error", () => { + latencyAlarmFactory.addLatencyAlarm(metric, LatencyType.P99, { + maxLatency: Duration.millis(0.5), + }); +}); + +test("addIntegrationLatencyAlarm: non-integral millisecond thresholds do not throw error", () => { + latencyAlarmFactory.addIntegrationLatencyAlarm(metric, LatencyType.P99, { + maxLatency: Duration.millis(2.5), + }); +}); + +test("addDurationAlarm: non-integral millisecond durations do not throw error", () => { + latencyAlarmFactory.addDurationAlarm(metric, LatencyType.P99, { + maxDuration: Duration.millis(0.5), + }); +}); + +test("addJvmGarbageCollectionDurationAlarm: non-integral millisecond durations do not throw error", () => { + latencyAlarmFactory.addJvmGarbageCollectionDurationAlarm( + metric, + LatencyType.P99, + { + maxDuration: Duration.millis(2.5), + }, + ); +}); From dc4f063634d3a752d7acc079d7d39fe052925d17 Mon Sep 17 00:00:00 2001 From: chesleypappas Date: Wed, 30 Oct 2024 09:57:46 -0400 Subject: [PATCH 3/5] fix(cloudwatch): use correct metric statistic for IncomingLogEvents (#589) Fixes #588 --- _By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license_ Co-authored-by: Chesley Pappas --- .../CloudWatchLogsMetricFactory.ts | 2 +- .../__snapshots__/LogMonitoring.test.ts.snap | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/monitoring/aws-cloudwatch/CloudWatchLogsMetricFactory.ts b/lib/monitoring/aws-cloudwatch/CloudWatchLogsMetricFactory.ts index 2a141a7e..819ff583 100644 --- a/lib/monitoring/aws-cloudwatch/CloudWatchLogsMetricFactory.ts +++ b/lib/monitoring/aws-cloudwatch/CloudWatchLogsMetricFactory.ts @@ -34,7 +34,7 @@ export class CloudWatchLogsMetricFactory extends BaseMetricFactory 9001 for 3 datapoints within 15 minutes\\",\\"value\\":9001,\\"yAxis\\":\\"left\\"}]},\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"Count\\",\\"showUnits\\":false}}}}]}", + "\\",\\"metrics\\":[[\\"AWS/Logs\\",\\"IncomingLogEvents\\",\\"LogGroupName\\",\\"DummyLogGroup\\",{\\"label\\":\\"Logs\\",\\"stat\\":\\"Sum\\"}]],\\"annotations\\":{\\"horizontal\\":[{\\"label\\":\\"Logs < 20 for 3 datapoints within 15 minutes\\",\\"value\\":20,\\"yAxis\\":\\"left\\"},{\\"label\\":\\"Logs > 9001 for 3 datapoints within 15 minutes\\",\\"value\\":9001,\\"yAxis\\":\\"left\\"}]},\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"Count\\",\\"showUnits\\":false}}}}]}", ], ], }, @@ -341,7 +341,7 @@ Object { "Namespace": "AWS/Logs", }, "Period": 300, - "Stat": "SampleCount", + "Stat": "Sum", }, "ReturnData": true, }, @@ -375,7 +375,7 @@ Object { "Namespace": "AWS/Logs", }, "Period": 300, - "Stat": "SampleCount", + "Stat": "Sum", }, "ReturnData": true, }, @@ -395,7 +395,7 @@ Object { Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[\\"AWS/Logs\\",\\"IncomingLogEvents\\",\\"LogGroupName\\",\\"DummyLogGroup\\",{\\"label\\":\\"Logs\\",\\"stat\\":\\"SampleCount\\"}]],\\"annotations\\":{\\"horizontal\\":[{\\"label\\":\\"Logs < 20 for 3 datapoints within 15 minutes\\",\\"value\\":20,\\"yAxis\\":\\"left\\"},{\\"label\\":\\"Logs > 9001 for 3 datapoints within 15 minutes\\",\\"value\\":9001,\\"yAxis\\":\\"left\\"}]},\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"Count\\",\\"showUnits\\":false}}}}]}", + "\\",\\"metrics\\":[[\\"AWS/Logs\\",\\"IncomingLogEvents\\",\\"LogGroupName\\",\\"DummyLogGroup\\",{\\"label\\":\\"Logs\\",\\"stat\\":\\"Sum\\"}]],\\"annotations\\":{\\"horizontal\\":[{\\"label\\":\\"Logs < 20 for 3 datapoints within 15 minutes\\",\\"value\\":20,\\"yAxis\\":\\"left\\"},{\\"label\\":\\"Logs > 9001 for 3 datapoints within 15 minutes\\",\\"value\\":9001,\\"yAxis\\":\\"left\\"}]},\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"Count\\",\\"showUnits\\":false}}}}]}", ], ], }, From fe0e226996ba81b45f5c63ad832badcb58854e34 Mon Sep 17 00:00:00 2001 From: cdklabs-automation <90142015+cdklabs-automation@users.noreply.github.com> Date: Sun, 3 Nov 2024 16:32:04 -0800 Subject: [PATCH 4/5] chore(deps): upgrade dependencies (#590) Upgrades project dependencies. See details in [workflow run]. [Workflow Run]: https://github.com/cdklabs/cdk-monitoring-constructs/actions/runs/11655977144 ------ *Automatically created by projen via the "upgrade-main" workflow* --- .github/workflows/pull-request-lint.yml | 2 +- .projen/tasks.json | 2 +- package.json | 2 +- yarn.lock | 94 ++++++++++++------------- 4 files changed, 50 insertions(+), 50 deletions(-) diff --git a/.github/workflows/pull-request-lint.yml b/.github/workflows/pull-request-lint.yml index 1dbf1159..100c15e0 100644 --- a/.github/workflows/pull-request-lint.yml +++ b/.github/workflows/pull-request-lint.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest permissions: pull-requests: write - if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target' + if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') steps: - uses: amannn/action-semantic-pull-request@v5.4.0 env: diff --git a/.projen/tasks.json b/.projen/tasks.json index 841818af..ed29ee80 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -309,7 +309,7 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --dep=dev,peer,prod,optional --filter=eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-prettier,jsii-diff,jsii-pacmak,prettier,projen,ts-node,typescript" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-prettier,jsii-diff,jsii-pacmak,prettier,projen,ts-node,typescript" }, { "exec": "yarn install --check-files" diff --git a/package.json b/package.json index 7611217b..1956b9e8 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "jsii-pacmak": "^1.104.0", "jsii-rosetta": "1.x", "prettier": "^2.8.8", - "projen": "^0.88.6", + "projen": "^0.90.0", "ts-jest": "^27", "ts-node": "^10.9.2", "typescript": "^4.9.5" diff --git a/yarn.lock b/yarn.lock index cdade6c3..76366ded 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11,9 +11,9 @@ "@jridgewell/trace-mapping" "^0.3.24" "@aws-cdk/asset-awscli-v1@^2.2.201": - version "2.2.208" - resolved "https://registry.yarnpkg.com/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.208.tgz#1675c6ba6061c0541ad0d258b42f0101d5ee10cf" - integrity sha512-r4CuHZaiBioU6waWhCNdEL4MO1+rfbcYVS/Ndz1XNGB5cxIRZwAS0Si6qD2D6nsgpPojiruFl67T1t5M9Va8kQ== + version "2.2.209" + resolved "https://registry.yarnpkg.com/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.209.tgz#cc981f02b0c43e32b4ad2b1d47117d31e3c2a0fe" + integrity sha512-tL7aBDzx/QBuZoQso9OST2BMCoev89v01iQZicOKlR0J6vWQLPiqZfn4vd9nissFbM4X+xIwi3UKasPBTQL0WQ== "@aws-cdk/asset-kubectl-v20@^2.1.2": version "2.1.3" @@ -31,18 +31,18 @@ integrity sha512-vxGq1c/JPzJ9TT9Io222oE4WvjDQBuITOylVVDsWPCNXH8Detu147e5w6SfzIEESRwAlXwcgEonRb+arlMRplQ== "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0": - version "7.26.0" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.0.tgz#9374b5cd068d128dac0b94ff482594273b1c2815" - integrity sha512-INCKxTtbXtcNbUZ3YXutwMpEleqttcswhAdee7dhuoVrD2cnuc3PqtERBtxkX5nziX9vnBL8WXmSGwv8CuPV6g== + version "7.26.2" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" + integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== dependencies: "@babel/helper-validator-identifier" "^7.25.9" js-tokens "^4.0.0" picocolors "^1.0.0" "@babel/compat-data@^7.25.9": - version "7.26.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.0.tgz#f02ba6d34e88fadd5e8861e8b38902f43cc1c819" - integrity sha512-qETICbZSLe7uXv9VE8T/RWOdIE5qqyTucOt4zLYMafj2MRO271VGgLd4RACJMeBO37UPWhXiKMBk7YlJ0fOzQA== + version "7.26.2" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.2.tgz#278b6b13664557de95b8f35b90d96785850bb56e" + integrity sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg== "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0": version "7.26.0" @@ -66,11 +66,11 @@ semver "^6.3.1" "@babel/generator@^7.25.9", "@babel/generator@^7.26.0", "@babel/generator@^7.7.2": - version "7.26.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.0.tgz#505cc7c90d92513f458a477e5ef0703e7c91b8d7" - integrity sha512-/AIkAmInnWwgEAJGQr9vY0c66Mj6kjkE2ZPB1PurTRaRAh3U+J45sAQMjQDJdh4WbR3l0x5xkimXBKyBXXAu2w== + version "7.26.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.2.tgz#87b75813bec87916210e5e01939a4c823d6bb74f" + integrity sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw== dependencies: - "@babel/parser" "^7.26.0" + "@babel/parser" "^7.26.2" "@babel/types" "^7.26.0" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" @@ -132,10 +132,10 @@ "@babel/template" "^7.25.9" "@babel/types" "^7.26.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0": - version "7.26.1" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.1.tgz#44e02499960df2cdce2c456372a3e8e0c3c5c975" - integrity sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.2": + version "7.26.2" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.2.tgz#fd7b6f487cfea09889557ef5d4eeb9ff9a5abd11" + integrity sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ== dependencies: "@babel/types" "^7.26.0" @@ -306,9 +306,9 @@ eslint-visitor-keys "^3.4.3" "@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.0.tgz#1b8e62d1244557927b9a7fc7a96e5bbd62e1870e" - integrity sha512-gh7PdNombP8ftL8TinYC8Xd7WEypB8EKV4PI2h0eMzndKjPCXuo2zUiZtD2Hu+MSPt02Ty2MdS788ADl9ai1rA== + version "4.12.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" + integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== "@eslint/eslintrc@^2.1.4": version "2.1.4" @@ -771,9 +771,9 @@ integrity sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag== "@types/node@*": - version "22.8.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.8.1.tgz#b39d4b98165e2ae792ce213f610c7c6108ccfa16" - integrity sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg== + version "22.8.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.8.7.tgz#04ab7a073d95b4a6ee899f235d43f3c320a976f4" + integrity sha512-LidcG+2UeYIWcMuMUpBKOnryBWG/rnmOHQR5apjn8myTQcx3rinFRn7DcIFhMnS0PPFSC6OafdIKEad0lj6U0Q== dependencies: undici-types "~6.19.8" @@ -1326,9 +1326,9 @@ camelcase@^6.2.0, camelcase@^6.3.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001669: - version "1.0.30001673" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001673.tgz#5aa291557af1c71340e809987367410aab7a5a9e" - integrity sha512-WTrjUCSMp3LYX0nE12ECkV0a+e6LC85E0Auz75555/qr78Oc8YWhEPNfDd6SHdtlCMSzqtuXY0uyEMNRcsKpKw== + version "1.0.30001677" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001677.tgz#27c2e2c637e007cfa864a16f7dfe7cde66b38b5f" + integrity sha512-fmfjsOlJUpMWu+mAAtZZZHz7UEwsUxIIvu1TJfO1HqFQvB/B+ii0xr9B5HpbZY/mC4XZ8SvjHJqtAY6pDPQEog== case@1.6.3, case@^1.6.3: version "1.6.3" @@ -1915,9 +1915,9 @@ dotgitignore@^2.1.0: minimatch "^3.0.4" electron-to-chromium@^1.5.41: - version "1.5.47" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.47.tgz#ef0751bc19b28be8ee44cd8405309de3bf3b20c7" - integrity sha512-zS5Yer0MOYw4rtK2iq43cJagHZ8sXN0jDHDKzB+86gSBSAI4v07S97mcq+Gs2vclAxSh1j7vOAHxSVgduiiuVQ== + version "1.5.50" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.50.tgz#d9ba818da7b2b5ef1f3dd32bce7046feb7e93234" + integrity sha512-eMVObiUQ2LdgeO1F/ySTXsvqvxb6ZH2zPGaMYsWzRDdOddUa77tdmI0ltg+L16UpbWdhPmuF3wIQYyQq65WfZw== emittery@^0.8.1: version "0.8.1" @@ -4244,9 +4244,9 @@ parse5@6.0.1: integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== parse5@^7.1.2: - version "7.2.0" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.2.0.tgz#8a0591ce9b7c5e2027173ab737d4d3fc3d826fab" - integrity sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA== + version "7.2.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.2.1.tgz#8928f55915e6125f430cc44309765bf17556a33a" + integrity sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ== dependencies: entities "^4.5.0" @@ -4355,10 +4355,10 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -projen@^0.88.6: - version "0.88.6" - resolved "https://registry.yarnpkg.com/projen/-/projen-0.88.6.tgz#09c17b7e15a5db4a14fe85e0f8fc52924c066df3" - integrity sha512-USj+Bu7YoRyt98Zx53uUZi8mOTkHb/mo6ybbNKa9v4i6DsBp0oeLzO/8zI2NXoDvBE+NRo2ahH2P5V7ns+PbpA== +projen@^0.90.0: + version "0.90.0" + resolved "https://registry.yarnpkg.com/projen/-/projen-0.90.0.tgz#dacfe2a75e05da3c5919d8e084d18f25bd952b43" + integrity sha512-klJXSriGl/w+9Gj22vNenq8DjMBIscaOArt0aSTtPjeZyb5s0OSrDF0ALSzlLfz4x7dT8jRB2C8sb9tuuR/sUA== dependencies: "@iarna/toml" "^2.2.5" case "^1.6.3" @@ -5024,17 +5024,17 @@ through@2, "through@>=2.2.7 <3": resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -tldts-core@^6.1.56: - version "6.1.56" - resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-6.1.56.tgz#6996d6f97172920aceedb9fadaa85a691e911332" - integrity sha512-Ihxv/Bwiyj73icTYVgBUkQ3wstlCglLoegSgl64oSrGUBX1hc7Qmf/CnrnJLaQdZrCnTaLqMYOwKMKlkfkFrxQ== +tldts-core@^6.1.58: + version "6.1.58" + resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-6.1.58.tgz#f0b5c1fcb2e214f558c7cb380fb1e6f4b2459d8b" + integrity sha512-dR936xmhBm7AeqHIhCWwK765gZ7dFyL+IqLSFAjJbFlUXGMLCb8i2PzlzaOuWBuplBTaBYseSb565nk/ZEM0Bg== tldts@^6.1.32: - version "6.1.56" - resolved "https://registry.yarnpkg.com/tldts/-/tldts-6.1.56.tgz#c425d343418a9c66db1197998559b828822bb9ec" - integrity sha512-2PT1oRZCxtsbLi5R2SQjE/v4vvgRggAtVcYj+3Rrcnu2nPZvu7m64+gDa/EsVSWd3QzEc0U0xN+rbEKsJC47kA== + version "6.1.58" + resolved "https://registry.yarnpkg.com/tldts/-/tldts-6.1.58.tgz#63d211f46f2c17d69d4cedf0c4c19423a608874f" + integrity sha512-MQJrJhjHOYGYb8DobR6Y4AdDbd4TYkyQ+KBDVc5ODzs1cbrvPpfN1IemYi9jfipJ/vR1YWvrDli0hg1y19VRoA== dependencies: - tldts-core "^6.1.56" + tldts-core "^6.1.58" tmpl@1.0.5: version "1.0.5" @@ -5085,9 +5085,9 @@ trim-newlines@^3.0.0: integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== ts-api-utils@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" - integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== + version "1.4.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.0.tgz#709c6f2076e511a81557f3d07a0cbd566ae8195c" + integrity sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ== ts-jest@^27: version "27.1.5" From 97cf069ab906d1fb706e4840f4385b46f073a2a4 Mon Sep 17 00:00:00 2001 From: Eugene Cheung <81188333+echeung-amzn@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:42:03 -0500 Subject: [PATCH 5/5] fix(MetricFactory): wrap search query dimensions with quotes to handle potential whitespace (#591) --- _By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license_ --- lib/common/metric/MetricFactory.ts | 9 ++++++--- .../__snapshots__/MetricFactory.test.ts.snap | 18 +++++++++--------- .../MonitoringAspect.test.ts.snap | 16 ++++++++-------- .../MonitoringFacade.test.ts.snap | 4 ++-- .../DynamoTableMonitoring.test.ts.snap | 8 ++++---- .../__snapshots__/EC2Monitoring.test.ts.snap | 14 +++++++------- .../CustomMonitoring.test.ts.snap | 4 ++-- 7 files changed, 38 insertions(+), 35 deletions(-) diff --git a/lib/common/metric/MetricFactory.ts b/lib/common/metric/MetricFactory.ts index 2df872e7..6531784e 100644 --- a/lib/common/metric/MetricFactory.ts +++ b/lib/common/metric/MetricFactory.ts @@ -150,16 +150,19 @@ export class MetricFactory { const finalPeriod = period ?? this.globalDefaults.period ?? DefaultMetricPeriod; const searchNamespace = this.getNamespaceWithFallback(namespace); + const keysWithQuotations = Object.keys(dimensionsMap).map( + (key) => `"${key}"`, + ); const namespacePlusDimensionKeys = [ - searchNamespace, - ...Object.keys(dimensionsMap), + `"${searchNamespace}"`, + ...keysWithQuotations, ].join(","); const metricSchema = `{${namespacePlusDimensionKeys}}`; const dimensionKeysAndValues = Object.entries( this.removeUndefinedEntries(dimensionsMap), ) - .map(([key, value]) => `${key}="${value}"`) + .map(([key, value]) => `"${key}"="${value}"`) .join(" "); const expression = `SEARCH('${metricSchema} ${dimensionKeysAndValues} ${query}', '${statistic}', ${finalPeriod.toSeconds()})`; diff --git a/test/common/metric/__snapshots__/MetricFactory.test.ts.snap b/test/common/metric/__snapshots__/MetricFactory.test.ts.snap index ca773302..5049afcf 100644 --- a/test/common/metric/__snapshots__/MetricFactory.test.ts.snap +++ b/test/common/metric/__snapshots__/MetricFactory.test.ts.snap @@ -314,7 +314,7 @@ MathExpression { exports[`snapshot test: createMetricSearch 1`] = ` MathExpression { "color": undefined, - "expression": "SEARCH('{DummyNamespace,DummyDimension} DummyDimension=\\"DummyDimensionValue\\" MyMetricPrefix-', 'Sum', 300)", + "expression": "SEARCH('{\\"DummyNamespace\\",\\"DummyDimension\\"} \\"DummyDimension\\"=\\"DummyDimensionValue\\" MyMetricPrefix-', 'Sum', 300)", "label": " ", "period": Duration { "amount": 5, @@ -333,7 +333,7 @@ MathExpression { exports[`snapshot test: createMetricSearch 2`] = ` MathExpression { "color": undefined, - "expression": "SEARCH('{DummyNamespaceOverride,DummyDimension} DummyDimension=\\"DummyDimensionValue\\" MyMetricPrefix-', 'Sum', 300)", + "expression": "SEARCH('{\\"DummyNamespaceOverride\\",\\"DummyDimension\\"} \\"DummyDimension\\"=\\"DummyDimensionValue\\" MyMetricPrefix-', 'Sum', 300)", "label": " ", "period": Duration { "amount": 5, @@ -352,7 +352,7 @@ MathExpression { exports[`snapshot test: createMetricSearch 3`] = ` MathExpression { "color": undefined, - "expression": "SEARCH('{DummyNamespaceOverride,DummyUndefinedDimension,DummyDefinedDimension} DummyDefinedDimension=\\"DummyDimensionValue\\" MyMetricPrefix-', 'Sum', 300)", + "expression": "SEARCH('{\\"DummyNamespaceOverride\\",\\"DummyUndefinedDimension\\",\\"DummyDefinedDimension\\"} \\"DummyDefinedDimension\\"=\\"DummyDimensionValue\\" MyMetricPrefix-', 'Sum', 300)", "label": " ", "period": Duration { "amount": 5, @@ -371,7 +371,7 @@ MathExpression { exports[`snapshot test: createMetricSearch 4`] = ` MathExpression { "color": undefined, - "expression": "SEARCH('{DummyNamespaceOverride} MyMetricPrefix-', 'Sum', 300)", + "expression": "SEARCH('{\\"DummyNamespaceOverride\\"} MyMetricPrefix-', 'Sum', 300)", "label": " ", "period": Duration { "amount": 5, @@ -470,7 +470,7 @@ Object { }, "metricSearch": MathExpression { "color": undefined, - "expression": "SEARCH('{DummyNamespace} DummyQuery', 'p90', 300)", + "expression": "SEARCH('{\\"DummyNamespace\\"} DummyQuery', 'p90', 300)", "label": " ", "period": Duration { "amount": 5, @@ -570,7 +570,7 @@ Object { }, "metricSearch": MathExpression { "color": undefined, - "expression": "SEARCH('{CustomTestNamespace} DummyQuery', 'p90', 900)", + "expression": "SEARCH('{\\"CustomTestNamespace\\"} DummyQuery', 'p90', 900)", "label": " ", "period": Duration { "amount": 15, @@ -670,7 +670,7 @@ Object { }, "metricSearch": MathExpression { "color": undefined, - "expression": "SEARCH('{CustomTestNamespace} DummyQuery', 'p90', 300)", + "expression": "SEARCH('{\\"CustomTestNamespace\\"} DummyQuery', 'p90', 300)", "label": " ", "period": Duration { "amount": 5, @@ -770,7 +770,7 @@ Object { }, "metricSearch": MathExpression { "color": undefined, - "expression": "SEARCH('{DummyNamespace} DummyQuery', 'p90', 900)", + "expression": "SEARCH('{\\"DummyNamespace\\"} DummyQuery', 'p90', 900)", "label": " ", "period": Duration { "amount": 15, @@ -870,7 +870,7 @@ Object { }, "metricSearch": MathExpression { "color": undefined, - "expression": "SEARCH('{DummyNamespace} DummyQuery', 'p90', 300)", + "expression": "SEARCH('{\\"DummyNamespace\\"} DummyQuery', 'p90', 300)", "label": " ", "period": Duration { "amount": 5, diff --git a/test/facade/__snapshots__/MonitoringAspect.test.ts.snap b/test/facade/__snapshots__/MonitoringAspect.test.ts.snap index a7cf64ed..d9b43e4f 100644 --- a/test/facade/__snapshots__/MonitoringAspect.test.ts.snap +++ b/test/facade/__snapshots__/MonitoringAspect.test.ts.snap @@ -3694,7 +3694,7 @@ Object { Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/DynamoDB,TableName,Operation} TableName=\\\\\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/DynamoDB\\\\\\",\\\\\\"TableName\\\\\\",\\\\\\"Operation\\\\\\"} \\\\\\"TableName\\\\\\"=\\\\\\"", Object { "Ref": "DummyTable77F0C182", }, @@ -3893,19 +3893,19 @@ Object { Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"CPUUtilization\\\\\\"', 'Average', 300)\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"max\\":100,\\"label\\":\\"%\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":6,\\"height\\":5,\\"x\\":6,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Disk - OPS\\",\\"region\\":\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"CPUUtilization\\\\\\"', 'Average', 300)\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"max\\":100,\\"label\\":\\"%\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":6,\\"height\\":5,\\"x\\":6,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Disk - OPS\\",\\"region\\":\\"", Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\"DiskReadOps\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([readops_classic_0, readops_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"DiskReadOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readops_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"EBSReadOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readops_ebs_0\\"}],[{\\"label\\":\\"DiskWriteOps\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([writeops_classic_0, writeops_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"DiskWriteOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writeops_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"EBSWriteOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writeops_ebs_0\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"Count\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":6,\\"height\\":5,\\"x\\":12,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Disk - Bytes\\",\\"region\\":\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\"DiskReadOps\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([readops_classic_0, readops_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"DiskReadOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readops_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"EBSReadOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readops_ebs_0\\"}],[{\\"label\\":\\"DiskWriteOps\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([writeops_classic_0, writeops_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"DiskWriteOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writeops_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"EBSWriteOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writeops_ebs_0\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"Count\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":6,\\"height\\":5,\\"x\\":12,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Disk - Bytes\\",\\"region\\":\\"", Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\"DiskReadBytes\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([readbytes_classic_0, readbytes_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"DiskReadBytes\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readbytes_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"EBSReadBytes\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readbytes_ebs_0\\"}],[{\\"label\\":\\"DiskWriteBytes\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([writebytes_classic_0, writebytes_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"DiskWriteBytes\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writebytes_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"EBSWriteBytes\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writebytes_ebs_0\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"bytes\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":6,\\"height\\":5,\\"x\\":18,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Network\\",\\"region\\":\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\"DiskReadBytes\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([readbytes_classic_0, readbytes_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"DiskReadBytes\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readbytes_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"EBSReadBytes\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readbytes_ebs_0\\"}],[{\\"label\\":\\"DiskWriteBytes\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([writebytes_classic_0, writebytes_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"DiskWriteBytes\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writebytes_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"EBSWriteBytes\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writebytes_ebs_0\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"bytes\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":6,\\"height\\":5,\\"x\\":18,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Network\\",\\"region\\":\\"", Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"NetworkIn\\\\\\"', 'Average', 300)\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"NetworkOut\\\\\\"', 'Average', 300)\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"bytes\\",\\"showUnits\\":false}}}}]}", + "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"NetworkIn\\\\\\"', 'Average', 300)\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"NetworkOut\\\\\\"', 'Average', 300)\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"bytes\\",\\"showUnits\\":false}}}}]}", ], ], }, @@ -3923,15 +3923,15 @@ Object { Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"CPUUtilization\\\\\\"', 'Average', 300)\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"max\\":100,\\"label\\":\\"%\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":8,\\"height\\":6,\\"x\\":8,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Disk - OPS\\",\\"region\\":\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"CPUUtilization\\\\\\"', 'Average', 300)\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"max\\":100,\\"label\\":\\"%\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":8,\\"height\\":6,\\"x\\":8,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Disk - OPS\\",\\"region\\":\\"", Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\"DiskReadOps\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([readops_classic_0, readops_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"DiskReadOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readops_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"EBSReadOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readops_ebs_0\\"}],[{\\"label\\":\\"DiskWriteOps\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([writeops_classic_0, writeops_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"DiskWriteOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writeops_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"EBSWriteOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writeops_ebs_0\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"Count\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":8,\\"height\\":6,\\"x\\":16,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Network\\",\\"region\\":\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\"DiskReadOps\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([readops_classic_0, readops_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"DiskReadOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readops_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"EBSReadOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readops_ebs_0\\"}],[{\\"label\\":\\"DiskWriteOps\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([writeops_classic_0, writeops_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"DiskWriteOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writeops_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"EBSWriteOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writeops_ebs_0\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"Count\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":8,\\"height\\":6,\\"x\\":16,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Network\\",\\"region\\":\\"", Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"NetworkIn\\\\\\"', 'Average', 300)\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"NetworkOut\\\\\\"', 'Average', 300)\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"bytes\\",\\"showUnits\\":false}}}}]}", + "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"NetworkIn\\\\\\"', 'Average', 300)\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"NetworkOut\\\\\\"', 'Average', 300)\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"bytes\\",\\"showUnits\\":false}}}}]}", ], ], }, diff --git a/test/facade/__snapshots__/MonitoringFacade.test.ts.snap b/test/facade/__snapshots__/MonitoringFacade.test.ts.snap index 097a7cad..6a222a1d 100644 --- a/test/facade/__snapshots__/MonitoringFacade.test.ts.snap +++ b/test/facade/__snapshots__/MonitoringFacade.test.ts.snap @@ -28,7 +28,7 @@ Object { Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/DynamoDB,TableName,Operation} TableName=\\\\\\"MyTableName\\\\\\" MetricName=\\\\\\"SuccessfulRequestLatency\\\\\\"', 'Average', 300)\\",\\"accountId\\":\\"09876543210\\",\\"region\\":\\"us-east-1\\"}]],\\"annotations\\":{\\"horizontal\\":[{\\"label\\":\\"GetItem > 10000 for 3 datapoints within 15 minutes\\",\\"value\\":10000,\\"yAxis\\":\\"left\\"}]},\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"ms\\",\\"showUnits\\":false}},\\"legend\\":{\\"position\\":\\"right\\"}}},{\\"type\\":\\"metric\\",\\"width\\":3,\\"height\\":6,\\"x\\":15,\\"y\\":2,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Throttles\\",\\"region\\":\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/DynamoDB\\\\\\",\\\\\\"TableName\\\\\\",\\\\\\"Operation\\\\\\"} \\\\\\"TableName\\\\\\"=\\\\\\"MyTableName\\\\\\" MetricName=\\\\\\"SuccessfulRequestLatency\\\\\\"', 'Average', 300)\\",\\"accountId\\":\\"09876543210\\",\\"region\\":\\"us-east-1\\"}]],\\"annotations\\":{\\"horizontal\\":[{\\"label\\":\\"GetItem > 10000 for 3 datapoints within 15 minutes\\",\\"value\\":10000,\\"yAxis\\":\\"left\\"}]},\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"ms\\",\\"showUnits\\":false}},\\"legend\\":{\\"position\\":\\"right\\"}}},{\\"type\\":\\"metric\\",\\"width\\":3,\\"height\\":6,\\"x\\":15,\\"y\\":2,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Throttles\\",\\"region\\":\\"", Object { "Ref": "AWS::Region", }, @@ -48,7 +48,7 @@ Object { Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/DynamoDB,TableName,Operation} TableName=\\\\\\"my-other-table\\\\\\" MetricName=\\\\\\"SuccessfulRequestLatency\\\\\\"', 'Average', 300)\\",\\"accountId\\":\\"01234567890\\",\\"region\\":\\"us-west-2\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"ms\\",\\"showUnits\\":false}},\\"legend\\":{\\"position\\":\\"right\\"}}},{\\"type\\":\\"metric\\",\\"width\\":3,\\"height\\":6,\\"x\\":15,\\"y\\":9,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Throttles\\",\\"region\\":\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/DynamoDB\\\\\\",\\\\\\"TableName\\\\\\",\\\\\\"Operation\\\\\\"} \\\\\\"TableName\\\\\\"=\\\\\\"my-other-table\\\\\\" MetricName=\\\\\\"SuccessfulRequestLatency\\\\\\"', 'Average', 300)\\",\\"accountId\\":\\"01234567890\\",\\"region\\":\\"us-west-2\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"ms\\",\\"showUnits\\":false}},\\"legend\\":{\\"position\\":\\"right\\"}}},{\\"type\\":\\"metric\\",\\"width\\":3,\\"height\\":6,\\"x\\":15,\\"y\\":9,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Throttles\\",\\"region\\":\\"", Object { "Ref": "AWS::Region", }, diff --git a/test/monitoring/aws-dynamo/__snapshots__/DynamoTableMonitoring.test.ts.snap b/test/monitoring/aws-dynamo/__snapshots__/DynamoTableMonitoring.test.ts.snap index 4f02a069..2d9e2e0d 100644 --- a/test/monitoring/aws-dynamo/__snapshots__/DynamoTableMonitoring.test.ts.snap +++ b/test/monitoring/aws-dynamo/__snapshots__/DynamoTableMonitoring.test.ts.snap @@ -226,7 +226,7 @@ Object { Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/DynamoDB,TableName,Operation} TableName=\\\\\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/DynamoDB\\\\\\",\\\\\\"TableName\\\\\\",\\\\\\"Operation\\\\\\"} \\\\\\"TableName\\\\\\"=\\\\\\"", Object { "Ref": "TableCD117FA1", }, @@ -1233,7 +1233,7 @@ Object { Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/DynamoDB,TableName,Operation} TableName=\\\\\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/DynamoDB\\\\\\",\\\\\\"TableName\\\\\\",\\\\\\"Operation\\\\\\"} \\\\\\"TableName\\\\\\"=\\\\\\"", Object { "Ref": "TableCD117FA1", }, @@ -1610,7 +1610,7 @@ Object { Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/DynamoDB,TableName,Operation} TableName=\\\\\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/DynamoDB\\\\\\",\\\\\\"TableName\\\\\\",\\\\\\"Operation\\\\\\"} \\\\\\"TableName\\\\\\"=\\\\\\"", Object { "Ref": "TableCD117FA1", }, @@ -2598,7 +2598,7 @@ Object { Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/DynamoDB,TableName,Operation} TableName=\\\\\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/DynamoDB\\\\\\",\\\\\\"TableName\\\\\\",\\\\\\"Operation\\\\\\"} \\\\\\"TableName\\\\\\"=\\\\\\"", Object { "Ref": "TableCD117FA1", }, diff --git a/test/monitoring/aws-ec2/__snapshots__/EC2Monitoring.test.ts.snap b/test/monitoring/aws-ec2/__snapshots__/EC2Monitoring.test.ts.snap index 35344394..e8ca8fc1 100644 --- a/test/monitoring/aws-ec2/__snapshots__/EC2Monitoring.test.ts.snap +++ b/test/monitoring/aws-ec2/__snapshots__/EC2Monitoring.test.ts.snap @@ -127,19 +127,19 @@ Object { Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"CPUUtilization\\\\\\"', 'Average', 300)\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"max\\":100,\\"label\\":\\"%\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":6,\\"height\\":5,\\"x\\":6,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Disk - OPS\\",\\"region\\":\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"CPUUtilization\\\\\\"', 'Average', 300)\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"max\\":100,\\"label\\":\\"%\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":6,\\"height\\":5,\\"x\\":6,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Disk - OPS\\",\\"region\\":\\"", Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\"DiskReadOps\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([readops_classic_0, readops_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"DiskReadOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readops_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"EBSReadOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readops_ebs_0\\"}],[{\\"label\\":\\"DiskWriteOps\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([writeops_classic_0, writeops_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"DiskWriteOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writeops_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"EBSWriteOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writeops_ebs_0\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"Count\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":6,\\"height\\":5,\\"x\\":12,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Disk - Bytes\\",\\"region\\":\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\"DiskReadOps\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([readops_classic_0, readops_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"DiskReadOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readops_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"EBSReadOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readops_ebs_0\\"}],[{\\"label\\":\\"DiskWriteOps\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([writeops_classic_0, writeops_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"DiskWriteOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writeops_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"EBSWriteOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writeops_ebs_0\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"Count\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":6,\\"height\\":5,\\"x\\":12,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Disk - Bytes\\",\\"region\\":\\"", Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\"DiskReadBytes\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([readbytes_classic_0, readbytes_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"DiskReadBytes\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readbytes_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"EBSReadBytes\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readbytes_ebs_0\\"}],[{\\"label\\":\\"DiskWriteBytes\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([writebytes_classic_0, writebytes_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"DiskWriteBytes\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writebytes_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"EBSWriteBytes\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writebytes_ebs_0\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"bytes\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":6,\\"height\\":5,\\"x\\":18,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Network\\",\\"region\\":\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\"DiskReadBytes\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([readbytes_classic_0, readbytes_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"DiskReadBytes\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readbytes_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"EBSReadBytes\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readbytes_ebs_0\\"}],[{\\"label\\":\\"DiskWriteBytes\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([writebytes_classic_0, writebytes_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"DiskWriteBytes\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writebytes_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"EBSWriteBytes\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writebytes_ebs_0\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"bytes\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":6,\\"height\\":5,\\"x\\":18,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Network\\",\\"region\\":\\"", Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"NetworkIn\\\\\\"', 'Average', 300)\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"NetworkOut\\\\\\"', 'Average', 300)\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"bytes\\",\\"showUnits\\":false}}}}]}", + "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"NetworkIn\\\\\\"', 'Average', 300)\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"NetworkOut\\\\\\"', 'Average', 300)\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"bytes\\",\\"showUnits\\":false}}}}]}", ], ], }, @@ -156,15 +156,15 @@ Object { Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"CPUUtilization\\\\\\"', 'Average', 300)\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"max\\":100,\\"label\\":\\"%\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":8,\\"height\\":6,\\"x\\":8,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Disk - OPS\\",\\"region\\":\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"CPUUtilization\\\\\\"', 'Average', 300)\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"max\\":100,\\"label\\":\\"%\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":8,\\"height\\":6,\\"x\\":8,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Disk - OPS\\",\\"region\\":\\"", Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\"DiskReadOps\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([readops_classic_0, readops_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"DiskReadOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readops_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"EBSReadOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readops_ebs_0\\"}],[{\\"label\\":\\"DiskWriteOps\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([writeops_classic_0, writeops_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"DiskWriteOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writeops_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"EBSWriteOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writeops_ebs_0\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"Count\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":8,\\"height\\":6,\\"x\\":16,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Network\\",\\"region\\":\\"", + "\\",\\"metrics\\":[[{\\"label\\":\\"DiskReadOps\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([readops_classic_0, readops_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"DiskReadOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readops_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"EBSReadOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"readops_ebs_0\\"}],[{\\"label\\":\\"DiskWriteOps\\",\\"expression\\":\\"AVG(REMOVE_EMPTY([writeops_classic_0, writeops_ebs_0]))\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"DiskWriteOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writeops_classic_0\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"EBSWriteOps\\\\\\"', 'Average', 300)\\",\\"visible\\":false,\\"id\\":\\"writeops_ebs_0\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"Count\\",\\"showUnits\\":false}}}},{\\"type\\":\\"metric\\",\\"width\\":8,\\"height\\":6,\\"x\\":16,\\"y\\":1,\\"properties\\":{\\"view\\":\\"timeSeries\\",\\"title\\":\\"Network\\",\\"region\\":\\"", Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"NetworkIn\\\\\\"', 'Average', 300)\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\\\\"NetworkOut\\\\\\"', 'Average', 300)\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"bytes\\",\\"showUnits\\":false}}}}]}", + "\\",\\"metrics\\":[[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"NetworkIn\\\\\\"', 'Average', 300)\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"AWS/EC2\\\\\\",\\\\\\"InstanceId\\\\\\"} MetricName=\\\\\\"NetworkOut\\\\\\"', 'Average', 300)\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"bytes\\",\\"showUnits\\":false}}}}]}", ], ], }, diff --git a/test/monitoring/custom/__snapshots__/CustomMonitoring.test.ts.snap b/test/monitoring/custom/__snapshots__/CustomMonitoring.test.ts.snap index ca5f9f20..ca4fb182 100644 --- a/test/monitoring/custom/__snapshots__/CustomMonitoring.test.ts.snap +++ b/test/monitoring/custom/__snapshots__/CustomMonitoring.test.ts.snap @@ -652,7 +652,7 @@ Object { Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[\\"DummyCustomNamespace\\",\\"DummyMetric1\\",\\"CustomDimension\\",\\"CustomDimensionValue\\"],[\\"DummyCustomNamespace\\",\\"DummyMetric2\\",\\"CustomDimension\\",\\"CustomDimensionValue\\",{\\"accountId\\":\\"01234567890\\",\\"region\\":\\"us-west-2\\"}],[\\"DummyCustomNamespace\\",\\"DummyMetric3\\",\\"CustomDimension\\",\\"CustomDimensionValue\\"],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{DummyCustomNamespace,CustomDimension} CustomDimension=\\\\\\"CustomDimensionValue\\\\\\" DummyMetric4-', 'Sum', 300)\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{DummyCustomNamespace,CustomDimension} CustomDimension=\\\\\\"CustomDimensionValue\\\\\\" DummyMetric5-', 'Sum', 300)\\",\\"accountId\\":\\"01234567890\\",\\"region\\":\\"us-west-2\\"}]],\\"annotations\\":{\\"horizontal\\":[{\\"label\\":\\"DummyMetric3 < 90 for 3 datapoints within 15 minutes\\",\\"value\\":90,\\"yAxis\\":\\"left\\"},{\\"label\\":\\"DummyMetric3 < 50 for 3 datapoints within 15 minutes\\",\\"value\\":50,\\"yAxis\\":\\"left\\"}]},\\"yAxis\\":{}}},{\\"type\\":\\"metric\\",\\"width\\":2,\\"height\\":100,\\"x\\":6,\\"y\\":3,\\"properties\\":{\\"view\\":\\"bar\\",\\"title\\":\\"DummyGroup2\\",\\"region\\":\\"", + "\\",\\"metrics\\":[[\\"DummyCustomNamespace\\",\\"DummyMetric1\\",\\"CustomDimension\\",\\"CustomDimensionValue\\"],[\\"DummyCustomNamespace\\",\\"DummyMetric2\\",\\"CustomDimension\\",\\"CustomDimensionValue\\",{\\"accountId\\":\\"01234567890\\",\\"region\\":\\"us-west-2\\"}],[\\"DummyCustomNamespace\\",\\"DummyMetric3\\",\\"CustomDimension\\",\\"CustomDimensionValue\\"],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"DummyCustomNamespace\\\\\\",\\\\\\"CustomDimension\\\\\\"} \\\\\\"CustomDimension\\\\\\"=\\\\\\"CustomDimensionValue\\\\\\" DummyMetric4-', 'Sum', 300)\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"DummyCustomNamespace\\\\\\",\\\\\\"CustomDimension\\\\\\"} \\\\\\"CustomDimension\\\\\\"=\\\\\\"CustomDimensionValue\\\\\\" DummyMetric5-', 'Sum', 300)\\",\\"accountId\\":\\"01234567890\\",\\"region\\":\\"us-west-2\\"}]],\\"annotations\\":{\\"horizontal\\":[{\\"label\\":\\"DummyMetric3 < 90 for 3 datapoints within 15 minutes\\",\\"value\\":90,\\"yAxis\\":\\"left\\"},{\\"label\\":\\"DummyMetric3 < 50 for 3 datapoints within 15 minutes\\",\\"value\\":50,\\"yAxis\\":\\"left\\"}]},\\"yAxis\\":{}}},{\\"type\\":\\"metric\\",\\"width\\":2,\\"height\\":100,\\"x\\":6,\\"y\\":3,\\"properties\\":{\\"view\\":\\"bar\\",\\"title\\":\\"DummyGroup2\\",\\"region\\":\\"", Object { "Ref": "AWS::Region", }, @@ -907,7 +907,7 @@ Min number of samples to alarm: 5", Object { "Ref": "AWS::Region", }, - "\\",\\"metrics\\":[[\\"DummyCustomNamespace\\",\\"DummyMetric1\\",\\"CustomDimension\\",\\"CustomDimensionValue\\"],[\\"DummyCustomNamespace\\",\\"DummyMetric2\\",\\"CustomDimension\\",\\"CustomDimensionValue\\",{\\"accountId\\":\\"01234567890\\",\\"region\\":\\"us-west-2\\"}],[\\"DummyCustomNamespace\\",\\"DummyMetric3\\",\\"CustomDimension\\",\\"CustomDimensionValue\\"],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{DummyCustomNamespace,CustomDimension} CustomDimension=\\\\\\"CustomDimensionValue\\\\\\" DummyMetric4-', 'Sum', 300)\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{DummyCustomNamespace,CustomDimension} CustomDimension=\\\\\\"CustomDimensionValue\\\\\\" DummyMetric5-', 'Sum', 300)\\",\\"accountId\\":\\"01234567890\\",\\"region\\":\\"us-west-2\\"}]],\\"annotations\\":{\\"horizontal\\":[{\\"label\\":\\"DummyMetric3 < 90 for 3 datapoints within 15 minutes\\",\\"value\\":90,\\"yAxis\\":\\"left\\"},{\\"label\\":\\"DummyMetric3 < 50 for 3 datapoints within 15 minutes\\",\\"value\\":50,\\"yAxis\\":\\"left\\"}]},\\"yAxis\\":{}}}]}", + "\\",\\"metrics\\":[[\\"DummyCustomNamespace\\",\\"DummyMetric1\\",\\"CustomDimension\\",\\"CustomDimensionValue\\"],[\\"DummyCustomNamespace\\",\\"DummyMetric2\\",\\"CustomDimension\\",\\"CustomDimensionValue\\",{\\"accountId\\":\\"01234567890\\",\\"region\\":\\"us-west-2\\"}],[\\"DummyCustomNamespace\\",\\"DummyMetric3\\",\\"CustomDimension\\",\\"CustomDimensionValue\\"],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"DummyCustomNamespace\\\\\\",\\\\\\"CustomDimension\\\\\\"} \\\\\\"CustomDimension\\\\\\"=\\\\\\"CustomDimensionValue\\\\\\" DummyMetric4-', 'Sum', 300)\\"}],[{\\"label\\":\\" \\",\\"expression\\":\\"SEARCH('{\\\\\\"DummyCustomNamespace\\\\\\",\\\\\\"CustomDimension\\\\\\"} \\\\\\"CustomDimension\\\\\\"=\\\\\\"CustomDimensionValue\\\\\\" DummyMetric5-', 'Sum', 300)\\",\\"accountId\\":\\"01234567890\\",\\"region\\":\\"us-west-2\\"}]],\\"annotations\\":{\\"horizontal\\":[{\\"label\\":\\"DummyMetric3 < 90 for 3 datapoints within 15 minutes\\",\\"value\\":90,\\"yAxis\\":\\"left\\"},{\\"label\\":\\"DummyMetric3 < 50 for 3 datapoints within 15 minutes\\",\\"value\\":50,\\"yAxis\\":\\"left\\"}]},\\"yAxis\\":{}}}]}", ], ], },