diff --git a/cdk-test-project/source/general-stack.ts b/cdk-test-project/source/general-stack.ts index 706a1689..5db34168 100644 --- a/cdk-test-project/source/general-stack.ts +++ b/cdk-test-project/source/general-stack.ts @@ -55,10 +55,8 @@ export class CdkTestGeneralStack extends cdk.Stack { cfnFuncHello.cfnOptions.metadata = { slicWatch: { alarms: { - Lambda: { - Invocations: { - Threshold: 4 - } + Invocations: { + Threshold: 4 } } } diff --git a/cdk-test-project/source/sfn-stack.ts b/cdk-test-project/source/sfn-stack.ts index 3f0f252c..b35a537c 100644 --- a/cdk-test-project/source/sfn-stack.ts +++ b/cdk-test-project/source/sfn-stack.ts @@ -51,10 +51,8 @@ export class CdkSFNStack extends cdk.Stack { cfnFuncHello.cfnOptions.metadata = { slicWatch: { alarms: { - Lambda: { - Invocations: { - Threshold: 4 - } + Invocations: { + Threshold: 4 } } } diff --git a/core/alarms/alarm-utils.ts b/core/alarms/alarm-utils.ts index c66c7d47..524e3792 100644 --- a/core/alarms/alarm-utils.ts +++ b/core/alarms/alarm-utils.ts @@ -4,6 +4,7 @@ import { pascal } from 'case' import type { AlarmActionsConfig, AlarmTemplate, CloudFormationResources, OptionalAlarmProps, SlicWatchMergedConfig } from './alarm-types' import { getResourceAlarmConfigurationsByType } from '../cf-template' +import { type ConfigType } from '../inputs/config-types' /* * RegEx to filter out invalid CloudFormation Logical ID characters @@ -23,9 +24,9 @@ const LOGICAL_ID_FILTER_REGEX = /[^a-z0-9]/gi type SpecificAlarmPropertiesGeneratorFunction = (metric: string, resourceName: string, config: SlicWatchMergedConfig) => Omit /** - * Create CloudFormation 'AWS::CloudWatch::Alarm' resources based on metrics for a specfic resources type + * Create CloudFormation 'AWS::CloudWatch::Alarm' resources based on metrics for a specific resources type * - * @param type The resource CloudFormation type, e.g., `AWS::Lambda::Function` + * @param type The resource config type * @param service A human readable name for the service, e.g., 'Lambda' * @param metrics A list of metric names to use in the alarms * @param config The alarm configuration for this specific resource type @@ -36,7 +37,7 @@ type SpecificAlarmPropertiesGeneratorFunction = (metric: string, resourceName: s * @returns An object containing the alarm resources in CloudFormation syntax by logical ID */ export function createCfAlarms ( - type: string, service: string, metrics: string[], config: SlicWatchMergedConfig, alarmActionsConfig: AlarmActionsConfig, + type: ConfigType, service: string, metrics: string[], config: SlicWatchMergedConfig, alarmActionsConfig: AlarmActionsConfig, compiledTemplate: Template, genSpecificAlarmProps: SpecificAlarmPropertiesGeneratorFunction ): CloudFormationResources { const resources: CloudFormationResources = {} @@ -62,7 +63,7 @@ export function createCfAlarms ( } /** - * Create a CloudFormation Alarm resourc + * Create a CloudFormation Alarm resource * * @param alarmProperties The alarm configuration for this specific resource type * @param alarmActionsConfig Alarm actions diff --git a/core/alarms/alb-target-group.ts b/core/alarms/alb-target-group.ts index 6f25d4fc..3a4b0886 100644 --- a/core/alarms/alb-target-group.ts +++ b/core/alarms/alb-target-group.ts @@ -6,6 +6,7 @@ import type { AlarmActionsConfig, CloudFormationResources, InputOutput, SlicWatc import { createAlarm, getStatisticName, makeAlarmLogicalId } from './alarm-utils' import type { ResourceType } from '../cf-template' import { getResourceAlarmConfigurationsByType, getResourcesByType } from '../cf-template' +import { ConfigType } from '../inputs/config-types' export type SlicWatchAlbTargetAlarmsConfig = T & { HTTPCode_Target_5XX_Count: T @@ -128,7 +129,7 @@ function createAlbTargetCfAlarm ( export default function createAlbTargetAlarms ( albTargetAlarmsConfig: SlicWatchAlbTargetAlarmsConfig, alarmActionsConfig: AlarmActionsConfig, compiledTemplate: Template ): CloudFormationResources { - const resourceConfigs = getResourceAlarmConfigurationsByType('AWS::ElasticLoadBalancingV2::TargetGroup', compiledTemplate, albTargetAlarmsConfig) + const resourceConfigs = getResourceAlarmConfigurationsByType(ConfigType.ApplicationELBTarget, compiledTemplate, albTargetAlarmsConfig) const resources: CloudFormationResources = {} for (const [targetGroupLogicalId, targetGroupResource] of Object.entries(resourceConfigs.resources)) { const mergedConfig = resourceConfigs.alarmConfigurations[targetGroupLogicalId] diff --git a/core/alarms/alb.ts b/core/alarms/alb.ts index e5fefb47..5b6cabe8 100644 --- a/core/alarms/alb.ts +++ b/core/alarms/alb.ts @@ -4,6 +4,7 @@ import { Fn } from 'cloudform' import type { AlarmActionsConfig, CloudFormationResources, InputOutput, SlicWatchMergedConfig } from './alarm-types' import { createCfAlarms, getStatisticName } from './alarm-utils' +import { ConfigType } from '../inputs/config-types' export type SlicWatchAlbAlarmsConfig = T & { HTTPCode_ELB_5XX_Count: T @@ -43,7 +44,7 @@ export default function createAlbAlarms ( albAlarmsConfig: SlicWatchAlbAlarmsConfig, alarmActionsConfig: AlarmActionsConfig, compiledTemplate: Template ): CloudFormationResources { return createCfAlarms( - 'AWS::ElasticLoadBalancingV2::LoadBalancer', + ConfigType.ApplicationELB, 'LoadBalancer', executionMetrics, albAlarmsConfig, diff --git a/core/alarms/api-gateway.ts b/core/alarms/api-gateway.ts index f393b2ef..13e0938e 100644 --- a/core/alarms/api-gateway.ts +++ b/core/alarms/api-gateway.ts @@ -6,6 +6,7 @@ import { Fn } from 'cloudform' import type { AlarmActionsConfig, CloudFormationResources, InputOutput, SlicWatchMergedConfig } from './alarm-types' import { createAlarm, getStatisticName, makeAlarmLogicalId } from './alarm-utils' import { getResourceAlarmConfigurationsByType } from '../cf-template' +import { ConfigType } from '../inputs/config-types' export type SlicWatchApiGwAlarmsConfig = T & { '5XXError': T @@ -84,7 +85,7 @@ export default function createApiGatewayAlarms ( ): CloudFormationResources { const resources: CloudFormationResources = {} const configuredResources = getResourceAlarmConfigurationsByType( - 'AWS::ApiGateway::RestApi', compiledTemplate, apiGwAlarmsConfig + ConfigType.ApiGateway, compiledTemplate, apiGwAlarmsConfig ) for (const [apiLogicalId, apiResource] of Object.entries(configuredResources.resources)) { diff --git a/core/alarms/appsync.ts b/core/alarms/appsync.ts index 767141be..6cffb6bd 100644 --- a/core/alarms/appsync.ts +++ b/core/alarms/appsync.ts @@ -5,6 +5,7 @@ import { Fn } from 'cloudform' import type { AlarmActionsConfig, CloudFormationResources, InputOutput, SlicWatchMergedConfig } from './alarm-types' import { createAlarm, getStatisticName, makeAlarmLogicalId } from './alarm-utils' import { getResourceAlarmConfigurationsByType } from '../cf-template' +import { ConfigType } from '../inputs/config-types' export type SlicWatchAppSyncAlarmsConfig = T & { '5XXError': T @@ -27,7 +28,7 @@ export default function createAppSyncAlarms ( appSyncAlarmsConfig: SlicWatchAppSyncAlarmsConfig, alarmActionsConfig: AlarmActionsConfig, compiledTemplate: Template ): CloudFormationResources { const resources = {} - const configuredResources = getResourceAlarmConfigurationsByType('AWS::AppSync::GraphQLApi', compiledTemplate, appSyncAlarmsConfig) + const configuredResources = getResourceAlarmConfigurationsByType(ConfigType.AppSync, compiledTemplate, appSyncAlarmsConfig) for (const [appSyncLogicalId, appSyncResource] of Object.entries(configuredResources.resources)) { for (const metric of executionMetrics) { diff --git a/core/alarms/dynamodb.ts b/core/alarms/dynamodb.ts index 682295f9..416fe861 100644 --- a/core/alarms/dynamodb.ts +++ b/core/alarms/dynamodb.ts @@ -5,6 +5,7 @@ import { Fn } from 'cloudform' import type { AlarmActionsConfig, CloudFormationResources, InputOutput, SlicWatchMergedConfig } from './alarm-types' import { createAlarm, makeAlarmLogicalId } from './alarm-utils' import { getResourceAlarmConfigurationsByType } from '../cf-template' +import { ConfigType } from '../inputs/config-types' export type SlicWatchDynamoDbAlarmsConfig = T & { ReadThrottleEvents: T @@ -32,7 +33,7 @@ export default function createDynamoDbAlarms ( compiledTemplate: Template ): CloudFormationResources { const resources: CloudFormationResources = {} - const configuredResources = getResourceAlarmConfigurationsByType('AWS::DynamoDB::Table', compiledTemplate, dynamoDbAlarmsConfig) + const configuredResources = getResourceAlarmConfigurationsByType(ConfigType.DynamoDB, compiledTemplate, dynamoDbAlarmsConfig) for (const [tableLogicalId, tableResource] of Object.entries(configuredResources.resources)) { for (const metric of dynamoDbMetrics) { diff --git a/core/alarms/ecs.ts b/core/alarms/ecs.ts index 38bb8261..ad42212e 100644 --- a/core/alarms/ecs.ts +++ b/core/alarms/ecs.ts @@ -5,6 +5,7 @@ import { Fn } from 'cloudform' import type { AlarmActionsConfig, CloudFormationResources, InputOutput, SlicWatchMergedConfig } from './alarm-types' import { createAlarm } from './alarm-utils' import { getResourceAlarmConfigurationsByType } from '../cf-template' +import { ConfigType } from '../inputs/config-types' export type SlicWatchEcsAlarmsConfig = T & { MemoryUtilization: T @@ -49,7 +50,7 @@ export default function createECSAlarms ( ecsAlarmsConfig: SlicWatchEcsAlarmsConfig, alarmActionsConfig: AlarmActionsConfig, compiledTemplate: Template ): CloudFormationResources { const resources: CloudFormationResources = {} - const configuredResources = getResourceAlarmConfigurationsByType('AWS::ECS::Service', compiledTemplate, ecsAlarmsConfig) + const configuredResources = getResourceAlarmConfigurationsByType(ConfigType.ECS, compiledTemplate, ecsAlarmsConfig) for (const [serviceLogicalId, serviceResource] of Object.entries(configuredResources.resources)) { for (const metric of executionMetrics) { diff --git a/core/alarms/eventbridge.ts b/core/alarms/eventbridge.ts index 60e73e3e..8fcef5c9 100644 --- a/core/alarms/eventbridge.ts +++ b/core/alarms/eventbridge.ts @@ -3,6 +3,7 @@ import { Fn } from 'cloudform' import type { AlarmActionsConfig, CloudFormationResources, InputOutput, SlicWatchMergedConfig } from './alarm-types' import { createCfAlarms } from './alarm-utils' +import { ConfigType } from '../inputs/config-types' export type SlicWatchEventsAlarmsConfig = T & { FailedInvocations: T @@ -43,7 +44,7 @@ export default function createRuleAlarms ( eventsAlarmsConfig: SlicWatchEventsAlarmsConfig, alarmActionsConfig: AlarmActionsConfig, compiledTemplate: Template ): CloudFormationResources { return createCfAlarms( - 'AWS::Events::Rule', + ConfigType.Events, 'Events', executionMetrics, eventsAlarmsConfig, diff --git a/core/alarms/kinesis.ts b/core/alarms/kinesis.ts index a2a6b427..d55c8e48 100644 --- a/core/alarms/kinesis.ts +++ b/core/alarms/kinesis.ts @@ -6,6 +6,7 @@ import { pascal } from 'case' import { getResourceAlarmConfigurationsByType } from '../cf-template' import type { AlarmActionsConfig, CloudFormationResources, InputOutput, SlicWatchMergedConfig } from './alarm-types' import { createAlarm, getStatisticName, makeAlarmLogicalId } from './alarm-utils' +import { ConfigType } from '../inputs/config-types' export type SlicWatchKinesisAlarmsConfig = T & { 'GetRecords.IteratorAgeMilliseconds': T @@ -39,7 +40,7 @@ export default function createKinesisAlarms ( kinesisAlarmsConfig: SlicWatchKinesisAlarmsConfig, alarmActionsConfig: AlarmActionsConfig, compiledTemplate: Template ): CloudFormationResources { const resources: CloudFormationResources = {} - const configuredResources = getResourceAlarmConfigurationsByType('AWS::Kinesis::Stream', compiledTemplate, kinesisAlarmsConfig) + const configuredResources = getResourceAlarmConfigurationsByType(ConfigType.Kinesis, compiledTemplate, kinesisAlarmsConfig) for (const [streamLogicalId] of Object.entries(configuredResources.resources)) { for (const [type, metric] of Object.entries(kinesisAlarmTypes)) { diff --git a/core/alarms/lambda.ts b/core/alarms/lambda.ts index 08db913c..c183d0e2 100644 --- a/core/alarms/lambda.ts +++ b/core/alarms/lambda.ts @@ -5,6 +5,7 @@ import { Fn } from 'cloudform' import { getEventSourceMappingFunctions, getResourceAlarmConfigurationsByType } from '../cf-template' import type { AlarmActionsConfig, InputOutput, Value, SlicWatchMergedConfig } from './alarm-types' import { createAlarm } from './alarm-utils' +import { ConfigType } from '../inputs/config-types' export type SlicWatchLambdaAlarmsConfig = T & { Errors: T @@ -30,7 +31,7 @@ export default function createLambdaAlarms ( ) { const resources = {} - const configuredLambdaResources = getResourceAlarmConfigurationsByType('AWS::Lambda::Function', compiledTemplate, lambdaAlarmConfig) + const configuredLambdaResources = getResourceAlarmConfigurationsByType(ConfigType.Lambda, compiledTemplate, lambdaAlarmConfig) for (const [funcLogicalId, funcResource] of Object.entries(configuredLambdaResources.resources)) { const mergedConfig = configuredLambdaResources.alarmConfigurations[funcLogicalId] diff --git a/core/alarms/sns.ts b/core/alarms/sns.ts index 4160a0af..25c94f14 100644 --- a/core/alarms/sns.ts +++ b/core/alarms/sns.ts @@ -3,6 +3,7 @@ import { Fn } from 'cloudform' import type { AlarmActionsConfig, CloudFormationResources, InputOutput, SlicWatchMergedConfig } from './alarm-types' import { createCfAlarms } from './alarm-utils' +import { ConfigType } from '../inputs/config-types' export type SlicWatchSnsAlarmsConfig = T & { 'NumberOfNotificationsFilteredOut-InvalidAttributes': T @@ -41,7 +42,7 @@ export default function createSnsAlarms ( snsAlarmsConfig: SlicWatchSnsAlarmsConfig, alarmActionsConfig: AlarmActionsConfig, compiledTemplate: Template ): CloudFormationResources { return createCfAlarms( - 'AWS::SNS::Topic', + ConfigType.SNS, 'SNS', executionMetrics, snsAlarmsConfig, diff --git a/core/alarms/sqs.ts b/core/alarms/sqs.ts index c07e46a7..230e9a29 100644 --- a/core/alarms/sqs.ts +++ b/core/alarms/sqs.ts @@ -5,6 +5,7 @@ import { Fn } from 'cloudform' import type { AlarmActionsConfig, CloudFormationResources, InputOutput, SlicWatchMergedConfig } from './alarm-types' import { createAlarm } from './alarm-utils' import { getResourceAlarmConfigurationsByType } from '../cf-template' +import { ConfigType } from '../inputs/config-types' export type SlicWatchSqsAlarmsConfig = T & { InFlightMessagesPc: T @@ -25,7 +26,7 @@ export default function createSQSAlarms ( sqsAlarmsConfig: SlicWatchSqsAlarmsConfig, alarmActionsConfig: AlarmActionsConfig, compiledTemplate: Template ): CloudFormationResources { const resources: CloudFormationResources = {} - const configuredResources = getResourceAlarmConfigurationsByType('AWS::SQS::Queue', compiledTemplate, sqsAlarmsConfig) + const configuredResources = getResourceAlarmConfigurationsByType(ConfigType.SQS, compiledTemplate, sqsAlarmsConfig) for (const [queueLogicalId, queueResource] of Object.entries(configuredResources.resources)) { const mergedConfig = configuredResources.alarmConfigurations[queueLogicalId] diff --git a/core/alarms/step-functions.ts b/core/alarms/step-functions.ts index 1f775531..0243cd3e 100644 --- a/core/alarms/step-functions.ts +++ b/core/alarms/step-functions.ts @@ -3,6 +3,7 @@ import { Fn } from 'cloudform' import type { AlarmActionsConfig, CloudFormationResources, InputOutput, SlicWatchMergedConfig } from './alarm-types' import { createCfAlarms } from './alarm-utils' +import { ConfigType } from '../inputs/config-types' export type SlicWatchSfAlarmsConfig = T & { ExecutionThrottled: T @@ -43,7 +44,7 @@ export default function createStatesAlarms ( sfAlarmProperties: SlicWatchSfAlarmsConfig, alarmActionsConfig: AlarmActionsConfig, compiledTemplate: Template ): CloudFormationResources { return createCfAlarms( - 'AWS::StepFunctions::StateMachine', + ConfigType.States, 'States', executionMetrics, sfAlarmProperties, diff --git a/core/cf-template.ts b/core/cf-template.ts index 2eda0bb2..fb99ef7a 100644 --- a/core/cf-template.ts +++ b/core/cf-template.ts @@ -1,3 +1,5 @@ + +import { merge } from 'lodash' import type Resource from 'cloudform-types/types/resource' import type Template from 'cloudform-types/types/template' @@ -6,7 +8,8 @@ import { getLogger } from './logging' import { cascade } from './inputs/cascading-config' import { type SlicWatchMergedConfig } from './alarms/alarm-types' import { type WidgetMetricProperties } from './dashboards/dashboard-types' -import { merge } from 'lodash' +import { defaultConfig } from './inputs/default-config' +import { type ConfigType, cfTypeByConfigType } from './inputs/config-types' const logger = getLogger() @@ -55,18 +58,23 @@ export interface ResourceDashboardConfigurations ( - type: string, template: Template, config: M + type: ConfigType, template: Template, config: M ): ResourceAlarmConfigurations { const alarmConfigurations: Record = {} - const resources = getResourcesByType(type, template) + const resources = getResourcesByType(cfTypeByConfigType[type], template) for (const [funcLogicalId, resource] of Object.entries(resources)) { - alarmConfigurations[funcLogicalId] = merge({}, config, cascade(resource?.Metadata?.slicWatch?.alarms ?? {}) as M) + const resourceConfig = resource?.Metadata?.slicWatch?.alarms // Resource-specific overrides + const defaultResourceConfig = defaultConfig.alarms?.[type] // Default configuration for the type's alarms + // Cascade the default resource's configuration into the resource-specific overrides + const cascadedResourceConfig = resourceConfig !== undefined ? cascade(merge({}, defaultResourceConfig, resourceConfig)) : {} + // Lastly, cascade the full SLIC Watch config for any properties not yet set in the widget's config + alarmConfigurations[funcLogicalId] = cascade(merge({}, config, cascadedResourceConfig)) as M } return { resources, @@ -78,18 +86,23 @@ export function getResourceAlarmConfigurationsByType ( - type: string, template: Template, config: T + type: ConfigType, template: Template, config: T ): ResourceDashboardConfigurations { const dashConfigurations: Record = {} - const resources = getResourcesByType(type, template) + const resources = getResourcesByType(cfTypeByConfigType[type], template) for (const [logicalId, resource] of Object.entries(resources)) { - dashConfigurations[logicalId] = cascade(merge({}, config, cascade(resource?.Metadata?.slicWatch?.dashboard ?? {}))) as T + const resourceConfig = resource?.Metadata?.slicWatch?.dashboard // Resource-specific overrides + const defaultResourceConfig = defaultConfig.dashboard?.widgets?.[type] // Default configuration for the widget + // Cascade the default resource's configuration into the resource-specific overrides + const cascadedResourceConfig = resourceConfig !== undefined ? cascade(merge({}, defaultResourceConfig, resourceConfig)) : {} + // Lastly, cascade the full SLIC Watch config for any properties not yet set in the widget's config + dashConfigurations[logicalId] = cascade(merge({}, config, cascadedResourceConfig)) as T } return { resources, diff --git a/core/dashboards/dashboard-types.ts b/core/dashboards/dashboard-types.ts index 4a9454f5..52004608 100644 --- a/core/dashboards/dashboard-types.ts +++ b/core/dashboards/dashboard-types.ts @@ -1,4 +1,5 @@ import type { Widget } from 'cloudwatch-dashboard-types' +import { type ConfigType } from '../inputs/config-types' export type YAxisPos = 'left' | 'right' @@ -30,18 +31,18 @@ export interface WidgetMetricProperties { } export interface Widgets extends WidgetMetricProperties { - Lambda: LambdaDashboardProperties - ApiGateway: ApiGwDashboardProperties - States: SfDashboardProperties - DynamoDB: DynamoDbDashboardProperties - Kinesis: KinesisDashboardProperties - SQS: SqsDashboardProperties - ECS: EcsDashboardProperties - SNS: SnsDashboardProperties - Events: RuleDashboardProperties - ApplicationELB: AlbDashboardProperties - ApplicationELBTarget: AlbTargetDashboardProperties - AppSync: AppSyncDashboardProperties + [ConfigType.Lambda]: LambdaDashboardProperties + [ConfigType.ApiGateway]: ApiGwDashboardProperties + [ConfigType.States]: SfDashboardProperties + [ConfigType.DynamoDB]: DynamoDbDashboardProperties + [ConfigType.Kinesis]: KinesisDashboardProperties + [ConfigType.SQS]: SqsDashboardProperties + [ConfigType.ECS]: EcsDashboardProperties + [ConfigType.SNS]: SnsDashboardProperties + [ConfigType.Events]: RuleDashboardProperties + [ConfigType.ApplicationELB]: AlbDashboardProperties + [ConfigType.ApplicationELBTarget]: AlbTargetDashboardProperties + [ConfigType.AppSync]: AppSyncDashboardProperties } type NestedPartial = { diff --git a/core/dashboards/dashboard.ts b/core/dashboards/dashboard.ts index 96814bc3..4eec8caa 100644 --- a/core/dashboards/dashboard.ts +++ b/core/dashboards/dashboard.ts @@ -4,8 +4,7 @@ import { type Dashboard, type WidgetMetric, type Statistic, type YAxisPosition } import { cascade } from '../inputs/cascading-config' import { getEventSourceMappingFunctions, addResource, getResourceDashboardConfigurationsByType } from '../cf-template' import type { - WidgetMetricProperties, MetricDefs, SlicWatchDashboardConfig, SlicWatchInputDashboardConfig, - Widgets, WidgetWithSize + WidgetMetricProperties, MetricDefs, SlicWatchDashboardConfig, SlicWatchInputDashboardConfig, WidgetWithSize } from './dashboard-types' import { findLoadBalancersForTargetGroup } from '../alarms/alb-target-group' @@ -15,6 +14,7 @@ import { resolveLoadBalancerFullNameForSub, resolveTargetGroupFullNameForSub } from './dashboard-utils' import { getLogger } from '../logging' +import { ConfigType } from '../inputs/config-types' const MAX_WIDTH = 24 @@ -130,7 +130,7 @@ export default function addDashboard (dashboardConfig: SlicWatchInputDashboardCo * @return * Object with CloudFormation Lambda Function resources by resource name */ function createLambdaWidgets (): WidgetWithSize[] { - const configuredResources = getResourceDashboardConfigurationsByType('AWS::Lambda::Function', compiledTemplate, lambdaDashConfig) + const configuredResources = getResourceDashboardConfigurationsByType(ConfigType.Lambda, compiledTemplate, lambdaDashConfig) const eventSourceMappingFunctions = getEventSourceMappingFunctions(compiledTemplate) const lambdaWidgets: any = [] @@ -142,14 +142,14 @@ export default function addDashboard (dashboardConfig: SlicWatchInputDashboardCo const metricDefs: MetricDefs[] = [] for (const funcLogicalId of Object.keys(configuredResources.resources)) { const funcConfig = configuredResources.dashConfigurations[funcLogicalId] - const metricConfig = funcConfig[metric] - if (metricConfig.enabled !== false) { + const functionMetricConfig = funcConfig[metric] + if (functionMetricConfig.enabled !== false) { metricDefs.push({ namespace: 'AWS/Lambda', metric, dimensions: { FunctionName: `\${${funcLogicalId}}` }, stat, - yAxis: metricConfig.yAxis + yAxis: functionMetricConfig.yAxis }) } } @@ -158,7 +158,7 @@ export default function addDashboard (dashboardConfig: SlicWatchInputDashboardCo const metricStatWidget = createMetricWidget( `Lambda ${metric} ${stat} per Function`, metricDefs, - metricConfig as Widgets + metricConfig ) lambdaWidgets.push(metricStatWidget) } @@ -178,9 +178,9 @@ export default function addDashboard (dashboardConfig: SlicWatchInputDashboardCo metric: 'IteratorAge', dimensions: { FunctionName: `\${${funcLogicalId}}` }, stat: stat as Statistic, - yAxis: metricConfig.yAxis + yAxis: functionMetricConfig.yAxis })), - metricConfig as Widgets + functionMetricConfig ) lambdaWidgets.push(iteratorAgeWidget) } @@ -213,7 +213,7 @@ export default function addDashboard (dashboardConfig: SlicWatchInputDashboardCo */ function createApiWidgets (): WidgetWithSize[] { - const configuredResources = getResourceDashboardConfigurationsByType('AWS::ApiGateway::RestApi', compiledTemplate, apiGwDashConfig) + const configuredResources = getResourceDashboardConfigurationsByType(ConfigType.ApiGateway, compiledTemplate, apiGwDashConfig) const apiWidgets: WidgetWithSize[] = [] for (const [logicalId, res] of Object.entries(configuredResources.resources)) { const apiName: string = resolveRestApiNameForSub(res, logicalId) // e.g., ${AWS::Stack} (Ref), ${OtherResource.Name} (GetAtt) @@ -253,9 +253,9 @@ export default function addDashboard (dashboardConfig: SlicWatchInputDashboardCo * Object of Step Function State Machine resources by resource name */ function createStateMachineWidgets (): WidgetWithSize[] { - const stateMachineResources = getResourceDashboardConfigurationsByType('AWS::StepFunctions::StateMachine', compiledTemplate, sfDashConfig) + const stateMachineResources = getResourceDashboardConfigurationsByType(ConfigType.States, compiledTemplate, sfDashConfig) const smWidgets: WidgetWithSize[] = [] - for (const [logicalId] of Object.entries(stateMachineResources.resources)) { + for (const logicalId of Object.keys(stateMachineResources.resources)) { const mergedConfig = stateMachineResources.dashConfigurations[logicalId] const widgetMetrics: MetricDefs[] = [] for (const [metric, metricConfig] of Object.entries(getConfiguredMetrics(mergedConfig))) { @@ -291,7 +291,7 @@ export default function addDashboard (dashboardConfig: SlicWatchInputDashboardCo * Object of DynamoDB table resources by resource name */ function createDynamoDbWidgets (): WidgetWithSize[] { - const configuredResources = getResourceDashboardConfigurationsByType('AWS::DynamoDB::Table', compiledTemplate, dynamoDbDashConfig) + const configuredResources = getResourceDashboardConfigurationsByType(ConfigType.DynamoDB, compiledTemplate, dynamoDbDashConfig) const ddbWidgets: WidgetWithSize[] = [] for (const [logicalId, res] of Object.entries(configuredResources.resources)) { const mergedConfig = configuredResources.dashConfigurations[logicalId] @@ -353,7 +353,7 @@ export default function addDashboard (dashboardConfig: SlicWatchInputDashboardCo * Object with CloudFormation Kinesis Data Stream resources by resource name */ function createStreamWidgets (): WidgetWithSize[] { - const configuredResources = getResourceDashboardConfigurationsByType('AWS::Kinesis::Stream', compiledTemplate, kinesisDashConfig) + const configuredResources = getResourceDashboardConfigurationsByType(ConfigType.Kinesis, compiledTemplate, kinesisDashConfig) const streamWidgets: WidgetWithSize[] = [] const metricGroups = { @@ -397,7 +397,7 @@ export default function addDashboard (dashboardConfig: SlicWatchInputDashboardCo * Object with CloudFormation SQS resources by resource name */ function createQueueWidgets (): WidgetWithSize[] { - const configuredResources = getResourceDashboardConfigurationsByType('AWS::SQS::Queue', compiledTemplate, sqsDashConfig) + const configuredResources = getResourceDashboardConfigurationsByType(ConfigType.SQS, compiledTemplate, sqsDashConfig) const queueWidgets: WidgetWithSize[] = [] const metricGroups = { @@ -444,7 +444,7 @@ export default function addDashboard (dashboardConfig: SlicWatchInputDashboardCo * Object of ECS Service resources by resource name */ function createEcsWidgets (): WidgetWithSize[] { - const configuredResources = getResourceDashboardConfigurationsByType('AWS::ECS::Service', compiledTemplate, ecsDashConfig) + const configuredResources = getResourceDashboardConfigurationsByType(ConfigType.ECS, compiledTemplate, ecsDashConfig) const ecsWidgets: WidgetWithSize[] = [] for (const [logicalId, res] of Object.entries(configuredResources.resources)) { const clusterName = resolveEcsClusterNameForSub(res.Properties?.Cluster) @@ -483,7 +483,7 @@ export default function addDashboard (dashboardConfig: SlicWatchInputDashboardCo */ function createTopicWidgets (): WidgetWithSize[] { const configuredResources = getResourceDashboardConfigurationsByType( - 'AWS::SNS::Topic', compiledTemplate, snsDashConfig + ConfigType.SNS, compiledTemplate, snsDashConfig ) const topicWidgets: WidgetWithSize[] = [] for (const logicalId of Object.keys(configuredResources.resources)) { @@ -522,7 +522,7 @@ export default function addDashboard (dashboardConfig: SlicWatchInputDashboardCo * Object of EventBridge Service resources by resource name */ function createRuleWidgets (): WidgetWithSize[] { - const configuredResources = getResourceDashboardConfigurationsByType('AWS::Events::Rule', compiledTemplate, ruleDashConfig) + const configuredResources = getResourceDashboardConfigurationsByType(ConfigType.Events, compiledTemplate, ruleDashConfig) const ruleWidgets: WidgetWithSize[] = [] for (const [logicalId] of Object.entries(configuredResources.resources)) { const widgetMetrics: MetricDefs[] = [] @@ -556,7 +556,7 @@ export default function addDashboard (dashboardConfig: SlicWatchInputDashboardCo * Create a set of CloudWatch Dashboard widgets for Application Load Balancer services. */ function createLoadBalancerWidgets (): WidgetWithSize[] { - const configuredResources = getResourceDashboardConfigurationsByType('AWS::ElasticLoadBalancingV2::LoadBalancer', compiledTemplate, albDashConfig) + const configuredResources = getResourceDashboardConfigurationsByType(ConfigType.ApplicationELB, compiledTemplate, albDashConfig) const loadBalancerWidgets: WidgetWithSize[] = [] for (const [logicalId] of Object.entries(configuredResources.resources)) { const loadBalancerName = `\${${logicalId}.LoadBalancerName}` @@ -598,7 +598,7 @@ export default function addDashboard (dashboardConfig: SlicWatchInputDashboardCo * The full CloudFormation template instance used to look up associated listener and ALB resources */ function createTargetGroupWidgets (): WidgetWithSize[] { - const configuredResources = getResourceDashboardConfigurationsByType('AWS::ElasticLoadBalancingV2::TargetGroup', compiledTemplate, albTargetDashConfig) + const configuredResources = getResourceDashboardConfigurationsByType(ConfigType.ApplicationELBTarget, compiledTemplate, albTargetDashConfig) const targetGroupWidgets: WidgetWithSize[] = [] for (const [tgLogicalId, targetGroupResource] of Object.entries(configuredResources.resources)) { @@ -645,7 +645,7 @@ export default function addDashboard (dashboardConfig: SlicWatchInputDashboardCo * Object of AppSync Service resources by resource name */ function createAppSyncWidgets (): WidgetWithSize[] { - const configuredResources = getResourceDashboardConfigurationsByType('AWS::AppSync::GraphQLApi', compiledTemplate, appSyncDashConfig) + const configuredResources = getResourceDashboardConfigurationsByType(ConfigType.AppSync, compiledTemplate, appSyncDashConfig) const appSyncWidgets: WidgetWithSize[] = [] const metricGroups = { diff --git a/core/inputs/cascading-config.ts b/core/inputs/cascading-config.ts index 8f48f772..cfd0e028 100644 --- a/core/inputs/cascading-config.ts +++ b/core/inputs/cascading-config.ts @@ -4,10 +4,10 @@ const MAX_DEPTH = 10 * Accept an object configuration with multiple levels. Return an applied version of this object * with default parameters from parent nodes cascaded to child objects where no override is present. * - * node hierarchical configuration - * parentNode The configuration from the parent node to be applied to the current node where no conflict occurs + * @param node hierarchical configuration + * @param parentNode The configuration from the parent node to be applied to the current node where no conflict occurs */ -export function cascade (node: object, parentNode?: object, depth = 0): object { +export function cascade (node: object, parentNode: object = {}, depth = 0): object { if (depth > 10) { throw new Error(`Maximum configuration depth of ${MAX_DEPTH} reached`) } diff --git a/core/inputs/config-types.ts b/core/inputs/config-types.ts new file mode 100644 index 00000000..d94d0ac1 --- /dev/null +++ b/core/inputs/config-types.ts @@ -0,0 +1,33 @@ +export enum ConfigType { + Lambda = 'Lambda', + ApiGateway = 'ApiGateway', + States = 'States', + DynamoDB = 'DynamoDB', + Kinesis = 'Kinesis', + SQS = 'SQS', + ECS = 'ECS', + SNS = 'SNS', + Events = 'Events', + ApplicationELB = 'ApplicationELB', + ApplicationELBTarget = 'ApplicationELBTarget', + AppSync = 'AppSync' +} + +export const cfTypeByConfigType = { + [ConfigType.Lambda]: 'AWS::Lambda::Function', + [ConfigType.ApiGateway]: 'AWS::ApiGateway::RestApi', + [ConfigType.States]: 'AWS::StepFunctions::StateMachine', + [ConfigType.DynamoDB]: 'AWS::DynamoDB::Table', + [ConfigType.Kinesis]: 'AWS::Kinesis::Stream', + [ConfigType.SQS]: 'AWS::SQS::Queue', + [ConfigType.ECS]: 'AWS::ECS::Service', + [ConfigType.SNS]: 'AWS::SNS::Topic', + [ConfigType.Events]: 'AWS::Events::Rule', + [ConfigType.ApplicationELB]: 'AWS::ElasticLoadBalancingV2::LoadBalancer', + [ConfigType.ApplicationELBTarget]: 'AWS::ElasticLoadBalancingV2::TargetGroup', + [ConfigType.AppSync]: 'AWS::AppSync::GraphQLApi' +} + +export const configTypesByCfType = Object.fromEntries(Object.entries(cfTypeByConfigType).map( + ([configType, cfType]) => [cfType, configType] as [string, ConfigType] +)) diff --git a/package.json b/package.json index 98113605..cc0038b3 100644 --- a/package.json +++ b/package.json @@ -24,11 +24,11 @@ "build": "npm run build -w core && npm run build -w cf-macro && npm run build -w serverless-plugin", "lint": "eslint .", "lintfix": "eslint --cache --fix .", - "test:packages": "DEBUG_LEVEL=info tap --include='**/tests/**/*.ts' --coverage-report=lcovonly --allow-incomplete-coverage", + "test:packages": "DEBUG_LEVEL=info tap --include='**/tests/**/*.ts' --exclude='**/tests/**/*snapshot.test.ts' --coverage-report=lcovonly --allow-incomplete-coverage", "test:snapshots": "DEBUG_LEVEL=info tap --include='**/tests/**/*snapshot.test.ts' --coverage-report=lcovonly --allow-incomplete-coverage", "test:snapshots:generate": "TAP_SNAPSHOT=1 npm run test:snapshots", "test:report": "tap report html", - "test": "npm run lint && npm run test:packages", + "test": "npm run lint && npm run test:packages && npm run test:snapshots", "prepare": "test ! -d '.git' || is-ci || husky install", "version": "npm version $npm_package_version --workspaces && ./scripts/sync-macro-version.cjs && git add **/package.json cf-macro/template.yaml" }, diff --git a/serverless-test-project-alb/serverless.yml b/serverless-test-project-alb/serverless.yml index 260bc535..d17c8d29 100644 --- a/serverless-test-project-alb/serverless.yml +++ b/serverless-test-project-alb/serverless.yml @@ -52,7 +52,7 @@ functions: path: /handleALB method: - POST - healthCheck: true # it is by default false but can be enbaled true + healthCheck: true # it is by default false but can be enabled true #you can disable it for not getting redundant health-check logs on the CloudWatch logs resources: ${file(./sls-resources.yml)} diff --git a/serverless-test-project-alb/sls-resources.yml b/serverless-test-project-alb/sls-resources.yml index de7e3540..b74ca43c 100644 --- a/serverless-test-project-alb/sls-resources.yml +++ b/serverless-test-project-alb/sls-resources.yml @@ -99,7 +99,7 @@ Resources: - Type: redirect RedirectConfig: Protocol: HTTP - Port: 400 + Port: '400' Host: "#{host}" Path: "/#{path}" Query: "#{query}" diff --git a/serverless-test-project/sls-resources.yml b/serverless-test-project/sls-resources.yml index 78980caf..f2d73717 100644 --- a/serverless-test-project/sls-resources.yml +++ b/serverless-test-project/sls-resources.yml @@ -28,7 +28,7 @@ Resources: - AttributeName: gsi1sk AttributeType: S - AttributeName: timestamp - AttributeType: N + AttributeType: 'N' KeySchema: - AttributeName: pk KeyType: HASH @@ -121,8 +121,8 @@ Resources: Properties: RequiresCompatibilities: - FARGATE - Cpu: 256 - Memory: 512 + Cpu: '256' + Memory: '512' ContainerDefinitions: - Name: "busybox" Image: "busybox" diff --git a/tap-snapshots/cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts.test.cjs b/tap-snapshots/cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts.test.cjs index 75170058..0e5ea6fb 100644 --- a/tap-snapshots/cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts.test.cjs +++ b/tap-snapshots/cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts.test.cjs @@ -70,7 +70,7 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "aws:cdk:path": "CdkECSStackTest-Europe/CDKMetadata/Default" }, "Properties": { - "Analytics": "v2:deflate64:H4sIAAAAAAAA/31Ry27CMBD8Fu7GbTlUXCmlCAm1UYK4IsfZpgvBjux1EIry73WepLSqFGlnx+PsembG58/8cSIudiqT0zTDmJcRCXlinjqUIO0hF0RglOWLPM9QCkKttlokLyITSkLyJkwqCCIwBUpgkAlLKDOviBsFqrSY8fLv24YtP3/2Yx1aAtVpejw63/nJQGujXV5LRm3FQPqZEUhnkK6D5H9ilRqw9he9US2/z2V9tg+WLHCxXyJysQJq9AMKtSPYiTiDG3/jFtZqic3yg7gGq01Ql3dBa2/lRVxZYLCoXR1+vFF1CjAI2k26bkE+s68zKKpfbnnZhbIT9vQKn6iwH3nPaEUCva8j7i7Qxo4OZs6n0OTRwYqhOPMy1O17mxpo702zYIsqlunU77TV6eB7j6uq7j4c5Y5YCFY7047sccWUToAf7UPxNOf+m02OFnFqnCI8Aw/b+g3+NWTOyAIAAA==" + "Analytics": "v2:deflate64:H4sIAAAAAAAA/31RTU8CMRD9LdxLRQ7GKyISEqMbIF7JbHdcR0q76UwhZrP/3ewHy4rG07x589r5eFN9f6cnIzjx2GT7saVUlxsBs1dw4l2JhncFiGBwrGdFYcmAkHfPHrIHsOAMZk8QchDcYDiSQYUWWMhYD1naKMjlx6ku/34d1Pz9Zz7UEQu6TnPGg/oWQo6yDD4WtWSQVgrNVJcbNDGQfPWS/4lFHpD5F71yLf9WmLr2lsxVElNLZhNTh9Loe7T2UXALqcULf+FmzN5QM3wvrsFildThBWQJgif4UkmgY33V/uOVq13AXtBO0mUzETAfB3RSb8667EzZAu8f8Z0cnVteM94JkMMw4K4Mbc7RQRtZWj86WCmCgy7Xvt23iYm3ZJoBW1Qp63PW5bPP+7ufcVXV2WuUIopaI/sY2pZnXCnnM9SffHOcTvTtRE9Gn0w0DtEJHVCv2/gNbRFl8sgCAAA=" }, "Type": "AWS::CDK::Metadata" }, @@ -917,7 +917,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "ClusterName", "\${EcsDefaultClusterMnL3mNNYN926A5246}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -928,7 +929,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "ClusterName", "\${EcsDefaultClusterMnL3mNNYN926A5246}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ] ], @@ -952,7 +954,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "LoadBalancer", "\${MyWebServerLB3B5FD3AB.LoadBalancerFullName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -961,7 +964,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "LoadBalancer", "\${MyWebServerLB3B5FD3AB.LoadBalancerFullName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -987,7 +991,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "TargetGroup", "\${MyWebServerLBPublicListenerECSGroup5AB9F1C3.TargetGroupFullName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -998,7 +1003,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "TargetGroup", "\${MyWebServerLBPublicListenerECSGroup5AB9F1C3.TargetGroupFullName}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ] ], @@ -1345,7 +1351,7 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "aws:cdk:path": "CdkGeneralStackTest-Europe/CDKMetadata/Default" }, "Properties": { - "Analytics": "v2:deflate64:H4sIAAAAAAAA/02Q30/DIBDH/5a9M9SZmL12Gp801rr3hdKzshaoPdhsGv53D5izCeE+9z24Xxu+feC3K3HGtWy6da9qPn84ITtG0mFGg3ze20FJ9vhpEgTWC103gs/P3kinrImhJZcwaoVIXmBKaD5XtocYiDYwvD8IRHDIi2jI5zsvO3A7gcDEoFrh4CwmPr+kQhWgKwaVEvxjIaX1xrEnGHo7aSAkdeHRFG2qmoG+Wj9KSEXK0f5Mf8olceZXcF+2iVKmwJrJCG0b2ste1HmOBIHBierQfip/Gc+n8b5Jevfgk5Yh3aXtlZyuYnZDuHbG0jpit8q08dmbd4N3y/YCM7YBfsSb092W09msjqjUeqRNKA28yvYXs0P/r9UBAAA=" + "Analytics": "v2:deflate64:H4sIAAAAAAAA/02QTU/DMAyGf8vumSmbhLhuIE4gRrf75KamZGuTUjsbVZT/jpKOsUvex68jfy3g8QGKGZ55ruvjvDUVhK2gPio88z6wZQg71xutnj5thqha7KoaIbx4q8U4m1K3vKGhM8zG2agMdhBK11JKJI2Kl3tkJmFYJVG8hLXXR5I1MinsTYNCZxwhvOZGJbGsepML/ONKa+etqGfqWzd2ZCW5N9FWsMldJyiJnR805Sabwf2Mf86l8MRvJF+uTtZEUdWjxc7VFYQdVtMeGaKiE1lhCKW/rOfzet8M4cOTz94E+d241ujxak5hjNfJVD5HmtbYJn1799J7uR0vKutqggPfnRYF3BdQzA5szHzwVkxHUE76CyBn/pPVAQAA" }, "Type": "AWS::CDK::Metadata" }, @@ -1592,10 +1598,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "Metadata": { "slicWatch": { "alarms": { - "Lambda": { - "Invocations": { - "Threshold": 4 - } + "Invocations": { + "Threshold": 4 } } } @@ -2260,7 +2264,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "ApiName", "myapi", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -2278,22 +2283,14 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "type": "metric", "properties": { "metrics": [ - [ - "AWS/ApiGateway", - "5XXError", - "ApiName", - "myapi", - { - "stat": "Sum" - } - ], [ "AWS/ApiGateway", "4XXError", "ApiName", "myapi", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -2311,31 +2308,14 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "type": "metric", "properties": { "metrics": [ - [ - "AWS/ApiGateway", - "5XXError", - "ApiName", - "myapi", - { - "stat": "Sum" - } - ], - [ - "AWS/ApiGateway", - "4XXError", - "ApiName", - "myapi", - { - "stat": "Sum" - } - ], [ "AWS/ApiGateway", "Latency", "ApiName", "myapi", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -2344,7 +2324,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "ApiName", "myapi", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ] ], @@ -2362,49 +2343,14 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "type": "metric", "properties": { "metrics": [ - [ - "AWS/ApiGateway", - "5XXError", - "ApiName", - "myapi", - { - "stat": "Sum" - } - ], - [ - "AWS/ApiGateway", - "4XXError", - "ApiName", - "myapi", - { - "stat": "Sum" - } - ], - [ - "AWS/ApiGateway", - "Latency", - "ApiName", - "myapi", - { - "stat": "Average" - } - ], - [ - "AWS/ApiGateway", - "Latency", - "ApiName", - "myapi", - { - "stat": "p95" - } - ], [ "AWS/ApiGateway", "Count", "ApiName", "myapi", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -2428,7 +2374,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "TableName", "\${TableCD117FA1}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -2446,22 +2393,14 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "type": "metric", "properties": { "metrics": [ - [ - "AWS/DynamoDB", - "ReadThrottleEvents", - "TableName", - "\${TableCD117FA1}", - { - "stat": "Sum" - } - ], [ "AWS/DynamoDB", "WriteThrottleEvents", "TableName", "\${TableCD117FA1}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -2485,7 +2424,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2494,7 +2434,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${ThrottlerHandler750A7C89}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2503,7 +2444,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveStreamHandler62F1767B}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2512,7 +2454,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveQueueHandler9F657A00}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2521,7 +2464,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveTableHandler119966B0}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -2545,7 +2489,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2554,7 +2499,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${ThrottlerHandler750A7C89}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2563,7 +2509,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveStreamHandler62F1767B}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2572,7 +2519,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveQueueHandler9F657A00}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2581,7 +2529,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveTableHandler119966B0}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -2605,7 +2554,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -2614,7 +2564,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${ThrottlerHandler750A7C89}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -2623,7 +2574,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveStreamHandler62F1767B}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -2632,7 +2584,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveQueueHandler9F657A00}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -2641,7 +2594,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveTableHandler119966B0}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ] ], @@ -2665,7 +2619,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -2674,7 +2629,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${ThrottlerHandler750A7C89}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -2683,7 +2639,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveStreamHandler62F1767B}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -2692,7 +2649,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveQueueHandler9F657A00}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -2701,7 +2659,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveTableHandler119966B0}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ] ], @@ -2725,7 +2684,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2734,7 +2694,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${ThrottlerHandler750A7C89}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2743,7 +2704,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveStreamHandler62F1767B}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2752,7 +2714,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveQueueHandler9F657A00}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2761,7 +2724,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveTableHandler119966B0}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -2785,7 +2749,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2794,7 +2759,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${ThrottlerHandler750A7C89}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2803,7 +2769,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveStreamHandler62F1767B}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2812,7 +2779,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveQueueHandler9F657A00}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2821,7 +2789,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveTableHandler119966B0}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -2845,7 +2814,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2854,7 +2824,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${ThrottlerHandler750A7C89}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2863,7 +2834,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveStreamHandler62F1767B}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2872,7 +2844,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveQueueHandler9F657A00}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2881,7 +2854,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveTableHandler119966B0}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -2905,7 +2879,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "QueueName", "\${DeadLetterQueue9F481546.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2914,7 +2889,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "QueueName", "\${DeadLetterQueue9F481546.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2923,7 +2899,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "QueueName", "\${DeadLetterQueue9F481546.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -2947,7 +2924,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "QueueName", "\${DeadLetterQueue9F481546.QueueName}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -2971,7 +2949,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "QueueName", "\${DeadLetterQueue9F481546.QueueName}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -2995,7 +2974,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "TopicName", "\${MyTopic86869434.TopicName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -3004,7 +2984,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "TopicName", "\${MyTopic86869434.TopicName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -3028,7 +3009,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "RuleName", "\${ruleF2C1DCDC}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -3037,7 +3019,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "RuleName", "\${ruleF2C1DCDC}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -3046,7 +3029,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "RuleName", "\${ruleF2C1DCDC}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -4843,7 +4827,7 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "aws:cdk:path": "CdkGeneralStackTest-US/CDKMetadata/Default" }, "Properties": { - "Analytics": "v2:deflate64:H4sIAAAAAAAA/02Q30/DIBDH/5a9M9SZmL12Gp801rr3hdKzshaoPdhsGv53D5izCeE+9z24Xxu+feC3K3HGtWy6da9qPn84ITtG0mFGg3ze20FJ9vhpEgTWC103gs/P3kinrImhJZcwaoVIXmBKaD5XtocYiDYwvD8IRHDIi2jI5zsvO3A7gcDEoFrh4CwmPr+kQhWgKwaVEvxjIaX1xrEnGHo7aSAkdeHRFG2qmoG+Wj9KSEXK0f5Mf8olceZXcF+2iVKmwJrJCG0b2ste1HmOBIHBierQfip/Gc+n8b5Jevfgk5Yh3aXtlZyuYnZDuHbG0jpit8q08dmbd4N3y/YCM7YBfsSb092W09msjqjUeqRNKA28yvYXs0P/r9UBAAA=" + "Analytics": "v2:deflate64:H4sIAAAAAAAA/02QTU/DMAyGf8vumSmbhLhuIE4gRrf75KamZGuTUjsbVZT/jpKOsUvex68jfy3g8QGKGZ55ruvjvDUVhK2gPio88z6wZQg71xutnj5thqha7KoaIbx4q8U4m1K3vKGhM8zG2agMdhBK11JKJI2Kl3tkJmFYJVG8hLXXR5I1MinsTYNCZxwhvOZGJbGsepML/ONKa+etqGfqWzd2ZCW5N9FWsMldJyiJnR805Sabwf2Mf86l8MRvJF+uTtZEUdWjxc7VFYQdVtMeGaKiE1lhCKW/rOfzet8M4cOTz94E+d241ujxak5hjNfJVD5HmtbYJn1799J7uR0vKutqggPfnRYF3BdQzA5szHzwVkxHUE76CyBn/pPVAQAA" }, "Type": "AWS::CDK::Metadata" }, @@ -5090,10 +5074,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "Metadata": { "slicWatch": { "alarms": { - "Lambda": { - "Invocations": { - "Threshold": 4 - } + "Invocations": { + "Threshold": 4 } } } @@ -5758,7 +5740,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "ApiName", "myapi", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -5776,22 +5759,14 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "type": "metric", "properties": { "metrics": [ - [ - "AWS/ApiGateway", - "5XXError", - "ApiName", - "myapi", - { - "stat": "Sum" - } - ], [ "AWS/ApiGateway", "4XXError", "ApiName", "myapi", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -5809,31 +5784,14 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "type": "metric", "properties": { "metrics": [ - [ - "AWS/ApiGateway", - "5XXError", - "ApiName", - "myapi", - { - "stat": "Sum" - } - ], - [ - "AWS/ApiGateway", - "4XXError", - "ApiName", - "myapi", - { - "stat": "Sum" - } - ], [ "AWS/ApiGateway", "Latency", "ApiName", "myapi", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -5842,7 +5800,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "ApiName", "myapi", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ] ], @@ -5860,49 +5819,14 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "type": "metric", "properties": { "metrics": [ - [ - "AWS/ApiGateway", - "5XXError", - "ApiName", - "myapi", - { - "stat": "Sum" - } - ], - [ - "AWS/ApiGateway", - "4XXError", - "ApiName", - "myapi", - { - "stat": "Sum" - } - ], - [ - "AWS/ApiGateway", - "Latency", - "ApiName", - "myapi", - { - "stat": "Average" - } - ], - [ - "AWS/ApiGateway", - "Latency", - "ApiName", - "myapi", - { - "stat": "p95" - } - ], [ "AWS/ApiGateway", "Count", "ApiName", "myapi", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -5926,7 +5850,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "TableName", "\${TableCD117FA1}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -5944,22 +5869,14 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "type": "metric", "properties": { "metrics": [ - [ - "AWS/DynamoDB", - "ReadThrottleEvents", - "TableName", - "\${TableCD117FA1}", - { - "stat": "Sum" - } - ], [ "AWS/DynamoDB", "WriteThrottleEvents", "TableName", "\${TableCD117FA1}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -5983,7 +5900,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -5992,7 +5910,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${ThrottlerHandler750A7C89}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -6001,7 +5920,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveStreamHandler62F1767B}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -6010,7 +5930,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveQueueHandler9F657A00}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -6019,7 +5940,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveTableHandler119966B0}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -6043,7 +5965,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -6052,7 +5975,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${ThrottlerHandler750A7C89}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -6061,7 +5985,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveStreamHandler62F1767B}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -6070,7 +5995,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveQueueHandler9F657A00}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -6079,7 +6005,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveTableHandler119966B0}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -6103,7 +6030,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -6112,7 +6040,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${ThrottlerHandler750A7C89}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -6121,7 +6050,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveStreamHandler62F1767B}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -6130,7 +6060,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveQueueHandler9F657A00}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -6139,7 +6070,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveTableHandler119966B0}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ] ], @@ -6163,7 +6095,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -6172,7 +6105,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${ThrottlerHandler750A7C89}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -6181,7 +6115,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveStreamHandler62F1767B}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -6190,7 +6125,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveQueueHandler9F657A00}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -6199,7 +6135,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveTableHandler119966B0}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ] ], @@ -6223,7 +6160,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -6232,7 +6170,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${ThrottlerHandler750A7C89}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -6241,7 +6180,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveStreamHandler62F1767B}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -6250,7 +6190,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveQueueHandler9F657A00}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -6259,7 +6200,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveTableHandler119966B0}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -6283,7 +6225,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -6292,7 +6235,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${ThrottlerHandler750A7C89}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -6301,7 +6245,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveStreamHandler62F1767B}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -6310,7 +6255,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveQueueHandler9F657A00}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -6319,7 +6265,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveTableHandler119966B0}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -6343,7 +6290,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -6352,7 +6300,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${ThrottlerHandler750A7C89}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -6361,7 +6310,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveStreamHandler62F1767B}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -6370,7 +6320,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveQueueHandler9F657A00}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -6379,7 +6330,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${DriveTableHandler119966B0}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -6403,7 +6355,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "QueueName", "\${DeadLetterQueue9F481546.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -6412,7 +6365,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "QueueName", "\${DeadLetterQueue9F481546.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -6421,7 +6375,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "QueueName", "\${DeadLetterQueue9F481546.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -6445,7 +6400,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "QueueName", "\${DeadLetterQueue9F481546.QueueName}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -6469,7 +6425,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "QueueName", "\${DeadLetterQueue9F481546.QueueName}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -6493,7 +6450,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "TopicName", "\${MyTopic86869434.TopicName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -6502,7 +6460,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "TopicName", "\${MyTopic86869434.TopicName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -6526,7 +6485,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "RuleName", "\${ruleF2C1DCDC}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -6535,7 +6495,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "RuleName", "\${ruleF2C1DCDC}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -6544,7 +6505,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "RuleName", "\${ruleF2C1DCDC}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -8312,7 +8274,7 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "aws:cdk:path": "CdkSFNStackTest-Europe/CDKMetadata/Default" }, "Properties": { - "Analytics": "v2:deflate64:H4sIAAAAAAAA/11P0UoDQQz8lr7nolaQvtpCoaAgp+Djke6lbbp7u6XZq8iy/+7etoIIgZnJhEwyx8UT3s/oSxvT28bJFtN7JGOhtLqkXjF9hJMYWO18JRkcDdueMK1Hb6IEP1m/PIPQgKkNjqd2xbfgxHxP8soy6GNHqhwVnycoGpejsRyXpAwa+bS77dMuklrFl5q58Zdg/w1g+iSJsCZxsDoEMQzlgcivZA7i6xV/dc7QsobxXOZqeDH34vf12puRwYee8ah3l4cFlprPjirSnEcfZWBsr/gDsE52pTwBAAA=" + "Analytics": "v2:deflate64:H4sIAAAAAAAA/11OTWvCQBD9Ld4n01RBeq2CUGihJEKPYdyMOibZFWeilGX/e8lqofT0voZ5b44vSyxndNPCtV3Ryw5jbeQ6oJs2Ub1i3IazOFjvfSYJehp2LWHcjN6ZBD9FvzyB0ICxCj1PdsbP0Iv7nuSdJdBFQ6psiq8TgC5wNbqObUXKoMbn/eOfNkbaKb7nzjd/Dd2/A4xfJAYbkh7WxyCOoTYy/iB3FJ9X/NUpQcUaxotjyOW10UH8Ia99BAl8aBlP+nSdl/hcYjk7qUhxGb3JwFjd8QcjaneZPAEAAA==" }, "Type": "AWS::CDK::Metadata" }, @@ -8323,10 +8285,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "Metadata": { "slicWatch": { "alarms": { - "Lambda": { - "Invocations": { - "Threshold": 4 - } + "Invocations": { + "Threshold": 4 } } } @@ -8405,7 +8365,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "StateMachineArn", "\${StateMachine2E01A3A5}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -8414,7 +8375,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "StateMachineArn", "\${StateMachine2E01A3A5}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -8423,7 +8385,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "StateMachineArn", "\${StateMachine2E01A3A5}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -8447,7 +8410,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -8471,7 +8435,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -8495,7 +8460,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ] ], @@ -8519,7 +8485,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ] ], @@ -8543,7 +8510,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -8567,7 +8535,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -8591,7 +8560,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "FunctionName", "\${HelloHandler2E4FBA4D}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -8615,7 +8585,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "TopicName", "\${MyTopic86869434.TopicName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -8624,7 +8595,8 @@ exports[`cdk-test-project/tests/snapshot/cdk-test-project-snapshot.test.ts > TAP "TopicName", "\${MyTopic86869434.TopicName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], diff --git a/tap-snapshots/sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts.test.cjs b/tap-snapshots/sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts.test.cjs index 89cc3e3d..d7c70649 100644 --- a/tap-snapshots/sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts.test.cjs +++ b/tap-snapshots/sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts.test.cjs @@ -145,7 +145,7 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "Properties": { "Code": { "S3Bucket": "aws-sam-cli-managed-default-samclisourcebucket-167xnalzxxva4", - "S3Key": "sam-test-project/841a60f2d379216bd90fa34e033d0596" + "S3Key": "sam-test-project/810e2a73503f0ee11a4a06f488e12d55" }, "Handler": "basic-handler.hello", "Role": { @@ -201,7 +201,7 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "Properties": { "Code": { "S3Bucket": "aws-sam-cli-managed-default-samclisourcebucket-167xnalzxxva4", - "S3Key": "sam-test-project/841a60f2d379216bd90fa34e033d0596" + "S3Key": "sam-test-project/810e2a73503f0ee11a4a06f488e12d55" }, "Handler": "stream-test-handler.handleDrive", "Role": { @@ -257,7 +257,7 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "Properties": { "Code": { "S3Bucket": "aws-sam-cli-managed-default-samclisourcebucket-167xnalzxxva4", - "S3Key": "sam-test-project/841a60f2d379216bd90fa34e033d0596" + "S3Key": "sam-test-project/810e2a73503f0ee11a4a06f488e12d55" }, "Handler": "basic-handler.hello", "Role": { @@ -344,16 +344,14 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "SamResourceId": "eventsRule", "slicWatch": { "alarms": { - "Lambda": { - "enabled": false - } + "enabled": false } } }, "Properties": { "Code": { "S3Bucket": "aws-sam-cli-managed-default-samclisourcebucket-167xnalzxxva4", - "S3Key": "sam-test-project/841a60f2d379216bd90fa34e033d0596" + "S3Key": "sam-test-project/810e2a73503f0ee11a4a06f488e12d55" }, "Handler": "rule-handler.handleRule", "Role": { @@ -457,10 +455,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "SamResourceId": "hello", "slicWatch": { "alarms": { - "Lambda": { - "Invocations": { - "Threshold": 2 - } + "Invocations": { + "Threshold": 2 } } } @@ -468,7 +464,7 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "Properties": { "Code": { "S3Bucket": "aws-sam-cli-managed-default-samclisourcebucket-167xnalzxxva4", - "S3Key": "sam-test-project/841a60f2d379216bd90fa34e033d0596" + "S3Key": "sam-test-project/810e2a73503f0ee11a4a06f488e12d55" }, "Handler": "basic-handler.hello", "Role": { @@ -524,7 +520,7 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "Properties": { "Code": { "S3Bucket": "aws-sam-cli-managed-default-samclisourcebucket-167xnalzxxva4", - "S3Key": "sam-test-project/841a60f2d379216bd90fa34e033d0596" + "S3Key": "sam-test-project/810e2a73503f0ee11a4a06f488e12d55" }, "Handler": "apigw-handler.handleGet", "Role": { @@ -616,7 +612,7 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "Properties": { "Code": { "S3Bucket": "aws-sam-cli-managed-default-samclisourcebucket-167xnalzxxva4", - "S3Key": "sam-test-project/841a60f2d379216bd90fa34e033d0596" + "S3Key": "sam-test-project/810e2a73503f0ee11a4a06f488e12d55" }, "Handler": "basic-handler.hello", "Role": { @@ -735,7 +731,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "StateMachineArn", "\${TestStateMachine}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -744,7 +741,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "StateMachineArn", "\${TestStateMachine}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -753,7 +751,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "StateMachineArn", "\${TestStateMachine}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -777,7 +776,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "TableName", "\${dataTable}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -795,15 +795,6 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "type": "metric", "properties": { "metrics": [ - [ - "AWS/DynamoDB", - "ReadThrottleEvents", - "TableName", - "\${dataTable}", - { - "stat": "Sum" - } - ], [ "AWS/DynamoDB", "ReadThrottleEvents", @@ -812,7 +803,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "GlobalSecondaryIndex", "GSI1", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -830,33 +822,14 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "type": "metric", "properties": { "metrics": [ - [ - "AWS/DynamoDB", - "ReadThrottleEvents", - "TableName", - "\${dataTable}", - { - "stat": "Sum" - } - ], - [ - "AWS/DynamoDB", - "ReadThrottleEvents", - "TableName", - "\${dataTable}", - "GlobalSecondaryIndex", - "GSI1", - { - "stat": "Sum" - } - ], [ "AWS/DynamoDB", "WriteThrottleEvents", "TableName", "\${dataTable}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -874,35 +847,6 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "type": "metric", "properties": { "metrics": [ - [ - "AWS/DynamoDB", - "ReadThrottleEvents", - "TableName", - "\${dataTable}", - { - "stat": "Sum" - } - ], - [ - "AWS/DynamoDB", - "ReadThrottleEvents", - "TableName", - "\${dataTable}", - "GlobalSecondaryIndex", - "GSI1", - { - "stat": "Sum" - } - ], - [ - "AWS/DynamoDB", - "WriteThrottleEvents", - "TableName", - "\${dataTable}", - { - "stat": "Sum" - } - ], [ "AWS/DynamoDB", "WriteThrottleEvents", @@ -911,7 +855,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "GlobalSecondaryIndex", "GSI1", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -935,7 +880,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${hello}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -944,7 +890,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${throttler}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -953,7 +900,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveStream}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -962,7 +910,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveQueue}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -971,7 +920,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveTable}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -980,7 +930,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${streamProcessor}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -989,7 +940,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${httpGetter}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -998,7 +950,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${eventsRule}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1022,7 +975,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${hello}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1031,7 +985,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${throttler}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1040,7 +995,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveStream}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1049,7 +1005,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveQueue}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1058,7 +1015,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveTable}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1067,7 +1025,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${streamProcessor}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1076,7 +1035,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${httpGetter}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1085,7 +1045,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${eventsRule}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1109,7 +1070,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${hello}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1118,7 +1080,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${throttler}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1127,7 +1090,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveStream}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1136,7 +1100,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveQueue}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1145,7 +1110,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveTable}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1154,7 +1120,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${streamProcessor}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1163,7 +1130,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${httpGetter}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1172,7 +1140,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${eventsRule}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ] ], @@ -1196,7 +1165,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${hello}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -1205,7 +1175,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${throttler}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -1214,7 +1185,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveStream}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -1223,7 +1195,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveQueue}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -1232,7 +1205,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveTable}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -1241,7 +1215,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${streamProcessor}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -1250,7 +1225,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${httpGetter}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -1259,7 +1235,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${eventsRule}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ] ], @@ -1283,7 +1260,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${hello}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -1292,7 +1270,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${throttler}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -1301,7 +1280,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveStream}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -1310,7 +1290,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveQueue}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -1319,7 +1300,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveTable}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -1328,7 +1310,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${streamProcessor}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -1337,7 +1320,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${httpGetter}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -1346,7 +1330,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${eventsRule}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -1370,7 +1355,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${hello}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1379,7 +1365,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${throttler}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1388,7 +1375,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveStream}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1397,7 +1385,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveQueue}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1406,7 +1395,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveTable}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1415,7 +1405,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${streamProcessor}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1424,7 +1415,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${httpGetter}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1433,7 +1425,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${eventsRule}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1457,7 +1450,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${hello}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -1466,7 +1460,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${throttler}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -1475,7 +1470,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveStream}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -1484,7 +1480,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveQueue}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -1493,7 +1490,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${driveTable}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -1502,7 +1500,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${streamProcessor}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -1511,7 +1510,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${httpGetter}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -1520,7 +1520,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${eventsRule}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -1544,7 +1545,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "FunctionName", "\${streamProcessor}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -1568,7 +1570,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "StreamName", "\${stream}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -1592,7 +1595,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "StreamName", "\${stream}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1601,7 +1605,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "StreamName", "\${stream}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1610,7 +1615,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "StreamName", "\${stream}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ] ], @@ -1634,7 +1640,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "StreamName", "\${stream}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1643,7 +1650,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "StreamName", "\${stream}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1667,7 +1675,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "QueueName", "\${regularQueue.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1676,7 +1685,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "QueueName", "\${regularQueue.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1685,7 +1695,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "QueueName", "\${regularQueue.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1709,7 +1720,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "QueueName", "\${regularQueue.QueueName}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -1733,7 +1745,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "QueueName", "\${regularQueue.QueueName}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -1757,7 +1770,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "QueueName", "\${fifoQueue.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1766,7 +1780,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "QueueName", "\${fifoQueue.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1775,7 +1790,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "QueueName", "\${fifoQueue.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1799,7 +1815,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "QueueName", "\${fifoQueue.QueueName}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -1823,7 +1840,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "QueueName", "\${fifoQueue.QueueName}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -1849,7 +1867,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "ClusterName", "\${ecsCluster}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1860,7 +1879,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "ClusterName", "\${ecsCluster}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ] ], @@ -1884,7 +1904,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "TopicName", "\${MonitoringTopic.TopicName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1893,7 +1914,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "TopicName", "\${MonitoringTopic.TopicName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1917,7 +1939,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "RuleName", "\${eventsRuleTrigger}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1926,7 +1949,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "RuleName", "\${eventsRuleTrigger}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1935,7 +1959,8 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "RuleName", "\${eventsRuleTrigger}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -4855,7 +4880,7 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "Properties": { "Code": { "S3Bucket": "aws-sam-cli-managed-default-samclisourcebucket-167xnalzxxva4", - "S3Key": "sam-test-project/841a60f2d379216bd90fa34e033d0596" + "S3Key": "sam-test-project/810e2a73503f0ee11a4a06f488e12d55" }, "Handler": "basic-handler.hello", "Role": { @@ -5094,7 +5119,7 @@ exports[`sam-test-project/tests/snapshot/sam-test-project-snapshot.test.ts > TAP "Properties": { "Code": { "S3Bucket": "aws-sam-cli-managed-default-samclisourcebucket-167xnalzxxva4", - "S3Key": "sam-test-project/841a60f2d379216bd90fa34e033d0596" + "S3Key": "sam-test-project/810e2a73503f0ee11a4a06f488e12d55" }, "Handler": "basic-handler.hello", "ReservedConcurrentExecutions": 0, diff --git a/tap-snapshots/serverless-test-project-alb/tests/snapshot/serverless-test-project-alb-snapshot.test.ts.test.cjs b/tap-snapshots/serverless-test-project-alb/tests/snapshot/serverless-test-project-alb-snapshot.test.ts.test.cjs index 6ac1b7e9..6d98018f 100644 --- a/tap-snapshots/serverless-test-project-alb/tests/snapshot/serverless-test-project-alb-snapshot.test.ts.test.cjs +++ b/tap-snapshots/serverless-test-project-alb/tests/snapshot/serverless-test-project-alb-snapshot.test.ts.test.cjs @@ -511,7 +511,8 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb- "FunctionName", "\${AlbEventLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -535,7 +536,8 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb- "FunctionName", "\${AlbEventLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -559,7 +561,8 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb- "FunctionName", "\${AlbEventLambdaFunction}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ] ], @@ -583,7 +586,8 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb- "FunctionName", "\${AlbEventLambdaFunction}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ] ], @@ -607,7 +611,8 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb- "FunctionName", "\${AlbEventLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -631,7 +636,8 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb- "FunctionName", "\${AlbEventLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -655,7 +661,8 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb- "FunctionName", "\${AlbEventLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -679,7 +686,8 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb- "LoadBalancer", "\${alb.LoadBalancerFullName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -688,7 +696,8 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb- "LoadBalancer", "\${alb.LoadBalancerFullName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -714,7 +723,8 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb- "TargetGroup", "\${AlbEventAlbTargetGrouphttpListener.TargetGroupFullName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -725,7 +735,8 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb- "TargetGroup", "\${AlbEventAlbTargetGrouphttpListener.TargetGroupFullName}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -736,7 +747,8 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb- "TargetGroup", "\${AlbEventAlbTargetGrouphttpListener.TargetGroupFullName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -747,7 +759,8 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb- "TargetGroup", "\${AlbEventAlbTargetGrouphttpListener.TargetGroupFullName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], diff --git a/tap-snapshots/serverless-test-project-appsync/tests/snapshot/serverless-test-project-appsync-snapshot.test.ts.test.cjs b/tap-snapshots/serverless-test-project-appsync/tests/snapshot/serverless-test-project-appsync-snapshot.test.ts.test.cjs index 7b5ec5d4..1863cd43 100644 --- a/tap-snapshots/serverless-test-project-appsync/tests/snapshot/serverless-test-project-appsync-snapshot.test.ts.test.cjs +++ b/tap-snapshots/serverless-test-project-appsync/tests/snapshot/serverless-test-project-appsync-snapshot.test.ts.test.cjs @@ -598,7 +598,8 @@ exports[`serverless-test-project-appsync/tests/snapshot/serverless-test-project- "TableName", "\${BooksTable}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -616,22 +617,14 @@ exports[`serverless-test-project-appsync/tests/snapshot/serverless-test-project- "type": "metric", "properties": { "metrics": [ - [ - "AWS/DynamoDB", - "ReadThrottleEvents", - "TableName", - "\${BooksTable}", - { - "stat": "Sum" - } - ], [ "AWS/DynamoDB", "WriteThrottleEvents", "TableName", "\${BooksTable}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], diff --git a/tap-snapshots/serverless-test-project/tests/snapshot/serverless-test-project-snapshot.test.ts.test.cjs b/tap-snapshots/serverless-test-project/tests/snapshot/serverless-test-project-snapshot.test.ts.test.cjs index c9ed6ceb..93211aad 100644 --- a/tap-snapshots/serverless-test-project/tests/snapshot/serverless-test-project-snapshot.test.ts.test.cjs +++ b/tap-snapshots/serverless-test-project/tests/snapshot/serverless-test-project-snapshot.test.ts.test.cjs @@ -1289,7 +1289,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "ApiName", "dev-serverless-test-project", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1307,22 +1308,14 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "type": "metric", "properties": { "metrics": [ - [ - "AWS/ApiGateway", - "5XXError", - "ApiName", - "dev-serverless-test-project", - { - "stat": "Sum" - } - ], [ "AWS/ApiGateway", "4XXError", "ApiName", "dev-serverless-test-project", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1340,31 +1333,14 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "type": "metric", "properties": { "metrics": [ - [ - "AWS/ApiGateway", - "5XXError", - "ApiName", - "dev-serverless-test-project", - { - "stat": "Sum" - } - ], - [ - "AWS/ApiGateway", - "4XXError", - "ApiName", - "dev-serverless-test-project", - { - "stat": "Sum" - } - ], [ "AWS/ApiGateway", "Latency", "ApiName", "dev-serverless-test-project", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1373,7 +1349,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "ApiName", "dev-serverless-test-project", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ] ], @@ -1391,49 +1368,14 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "type": "metric", "properties": { "metrics": [ - [ - "AWS/ApiGateway", - "5XXError", - "ApiName", - "dev-serverless-test-project", - { - "stat": "Sum" - } - ], - [ - "AWS/ApiGateway", - "4XXError", - "ApiName", - "dev-serverless-test-project", - { - "stat": "Sum" - } - ], - [ - "AWS/ApiGateway", - "Latency", - "ApiName", - "dev-serverless-test-project", - { - "stat": "Average" - } - ], - [ - "AWS/ApiGateway", - "Latency", - "ApiName", - "dev-serverless-test-project", - { - "stat": "p95" - } - ], [ "AWS/ApiGateway", "Count", "ApiName", "dev-serverless-test-project", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1457,7 +1399,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "StateMachineArn", "\${Workflow}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1466,7 +1409,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "StateMachineArn", "\${Workflow}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1475,7 +1419,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "StateMachineArn", "\${Workflow}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1499,7 +1444,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "StateMachineArn", "\${ExpressWorkflow}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1508,7 +1454,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "StateMachineArn", "\${ExpressWorkflow}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1517,7 +1464,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "StateMachineArn", "\${ExpressWorkflow}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1541,7 +1489,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "TableName", "\${dataTable}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1559,15 +1508,6 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "type": "metric", "properties": { "metrics": [ - [ - "AWS/DynamoDB", - "ReadThrottleEvents", - "TableName", - "\${dataTable}", - { - "stat": "Sum" - } - ], [ "AWS/DynamoDB", "ReadThrottleEvents", @@ -1576,7 +1516,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "GlobalSecondaryIndex", "GSI1", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1594,33 +1535,14 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "type": "metric", "properties": { "metrics": [ - [ - "AWS/DynamoDB", - "ReadThrottleEvents", - "TableName", - "\${dataTable}", - { - "stat": "Sum" - } - ], - [ - "AWS/DynamoDB", - "ReadThrottleEvents", - "TableName", - "\${dataTable}", - "GlobalSecondaryIndex", - "GSI1", - { - "stat": "Sum" - } - ], [ "AWS/DynamoDB", "WriteThrottleEvents", "TableName", "\${dataTable}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1638,35 +1560,6 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "type": "metric", "properties": { "metrics": [ - [ - "AWS/DynamoDB", - "ReadThrottleEvents", - "TableName", - "\${dataTable}", - { - "stat": "Sum" - } - ], - [ - "AWS/DynamoDB", - "ReadThrottleEvents", - "TableName", - "\${dataTable}", - "GlobalSecondaryIndex", - "GSI1", - { - "stat": "Sum" - } - ], - [ - "AWS/DynamoDB", - "WriteThrottleEvents", - "TableName", - "\${dataTable}", - { - "stat": "Sum" - } - ], [ "AWS/DynamoDB", "WriteThrottleEvents", @@ -1675,7 +1568,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "GlobalSecondaryIndex", "GSI1", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1699,7 +1593,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${HelloLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1708,7 +1603,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${ThrottlerLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1717,7 +1613,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveStreamLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1726,7 +1623,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveQueueLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1735,7 +1633,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveTableLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1744,7 +1643,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${StreamProcessorLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1753,7 +1653,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${HttpGetterLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1762,7 +1663,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${SubscriptionHandlerLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1771,7 +1673,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${EventsRuleLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1795,7 +1698,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${HelloLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1804,7 +1708,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${ThrottlerLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1813,7 +1718,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveStreamLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1822,7 +1728,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveQueueLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1831,7 +1738,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveTableLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1840,7 +1748,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${StreamProcessorLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1849,7 +1758,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${HttpGetterLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1858,7 +1768,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${SubscriptionHandlerLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -1867,7 +1778,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${EventsRuleLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -1891,7 +1803,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${HelloLambdaFunction}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1900,7 +1813,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${ThrottlerLambdaFunction}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1909,7 +1823,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveStreamLambdaFunction}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1918,7 +1833,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveQueueLambdaFunction}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1927,7 +1843,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveTableLambdaFunction}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1936,7 +1853,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${StreamProcessorLambdaFunction}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1945,7 +1863,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${HttpGetterLambdaFunction}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1954,7 +1873,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${SubscriptionHandlerLambdaFunction}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -1963,7 +1883,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${EventsRuleLambdaFunction}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ] ], @@ -1987,7 +1908,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${HelloLambdaFunction}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -1996,7 +1918,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${ThrottlerLambdaFunction}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -2005,7 +1928,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveStreamLambdaFunction}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -2014,7 +1938,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveQueueLambdaFunction}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -2023,7 +1948,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveTableLambdaFunction}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -2032,7 +1958,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${StreamProcessorLambdaFunction}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -2041,7 +1968,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${HttpGetterLambdaFunction}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -2050,7 +1978,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${SubscriptionHandlerLambdaFunction}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ], [ @@ -2059,7 +1988,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${EventsRuleLambdaFunction}", { - "stat": "p95" + "stat": "p95", + "yAxis": "left" } ] ], @@ -2083,7 +2013,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${HelloLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2092,7 +2023,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${ThrottlerLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2101,7 +2033,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveStreamLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2110,7 +2043,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveQueueLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2119,7 +2053,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveTableLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2128,7 +2063,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${StreamProcessorLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2137,7 +2073,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${HttpGetterLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2146,7 +2083,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${SubscriptionHandlerLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2155,7 +2093,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${EventsRuleLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -2179,7 +2118,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${HelloLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2188,7 +2128,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${ThrottlerLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2197,7 +2138,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveStreamLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2206,7 +2148,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveQueueLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2215,7 +2158,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveTableLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2224,7 +2168,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${StreamProcessorLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2233,7 +2178,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${HttpGetterLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2242,7 +2188,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${SubscriptionHandlerLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2251,7 +2198,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${EventsRuleLambdaFunction}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -2275,7 +2223,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${HelloLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2284,7 +2233,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${ThrottlerLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2293,7 +2243,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveStreamLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2302,7 +2253,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveQueueLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2311,7 +2263,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${DriveTableLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2320,7 +2273,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${StreamProcessorLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2329,7 +2283,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${HttpGetterLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2338,7 +2293,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${SubscriptionHandlerLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ], [ @@ -2347,7 +2303,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${EventsRuleLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -2371,7 +2328,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "FunctionName", "\${StreamProcessorLambdaFunction}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -2395,7 +2353,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "StreamName", "\${stream}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -2419,7 +2378,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "StreamName", "\${stream}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -2428,7 +2388,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "StreamName", "\${stream}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -2437,7 +2398,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "StreamName", "\${stream}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ] ], @@ -2461,7 +2423,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "StreamName", "\${stream}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2470,7 +2433,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "StreamName", "\${stream}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -2494,7 +2458,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "QueueName", "\${regularQueue.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2503,7 +2468,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "QueueName", "\${regularQueue.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2512,7 +2478,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "QueueName", "\${regularQueue.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -2536,7 +2503,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "QueueName", "\${regularQueue.QueueName}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -2560,7 +2528,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "QueueName", "\${regularQueue.QueueName}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -2584,7 +2553,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "QueueName", "\${fifoQueue.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2593,7 +2563,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "QueueName", "\${fifoQueue.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2602,7 +2573,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "QueueName", "\${fifoQueue.QueueName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -2626,7 +2598,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "QueueName", "\${fifoQueue.QueueName}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -2650,7 +2623,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "QueueName", "\${fifoQueue.QueueName}", { - "stat": "Maximum" + "stat": "Maximum", + "yAxis": "left" } ] ], @@ -2676,7 +2650,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "ClusterName", "\${ecsCluster}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ], [ @@ -2687,7 +2662,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "ClusterName", "\${ecsCluster}", { - "stat": "Average" + "stat": "Average", + "yAxis": "left" } ] ], @@ -2711,7 +2687,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "TopicName", "\${topic.TopicName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2720,7 +2697,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "TopicName", "\${topic.TopicName}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -2744,7 +2722,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "RuleName", "\${ServerlesstestprojectdeveventsRulerule1EventBridgeRule}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2753,7 +2732,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "RuleName", "\${ServerlesstestprojectdeveventsRulerule1EventBridgeRule}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ], [ @@ -2762,7 +2742,8 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot "RuleName", "\${ServerlesstestprojectdeveventsRulerule1EventBridgeRule}", { - "stat": "Sum" + "stat": "Sum", + "yAxis": "left" } ] ], @@ -3378,6 +3359,44 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot }, "Type": "AWS::CloudWatch::Alarm" }, + "slicWatchLambdaDurationAlarmEventsRuleLambdaFunction": { + "Properties": { + "ActionsEnabled": true, + "AlarmActions": [ + "test-topic" + ], + "AlarmDescription": { + "Fn::Sub": [ + "Max duration for \${EventsRuleLambdaFunction} breaches 95% of timeout (6)", + {} + ] + }, + "AlarmName": { + "Fn::Sub": [ + "Lambda_Duration_\${EventsRuleLambdaFunction}", + {} + ] + }, + "ComparisonOperator": "GreaterThanThreshold", + "Dimensions": [ + { + "Name": "FunctionName", + "Value": { + "Ref": "EventsRuleLambdaFunction" + } + } + ], + "EvaluationPeriods": 1, + "MetricName": "Duration", + "Namespace": "AWS/Lambda", + "OKActions": [], + "Period": 60, + "Statistic": "Maximum", + "Threshold": 5700, + "TreatMissingData": "notBreaching" + }, + "Type": "AWS::CloudWatch::Alarm" + }, "slicWatchLambdaDurationAlarmHelloLambdaFunction": { "Properties": { "ActionsEnabled": true, @@ -3720,6 +3739,44 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot }, "Type": "AWS::CloudWatch::Alarm" }, + "slicWatchLambdaErrorsAlarmEventsRuleLambdaFunction": { + "Properties": { + "ActionsEnabled": true, + "AlarmActions": [ + "test-topic" + ], + "AlarmDescription": { + "Fn::Sub": [ + "Error count for \${EventsRuleLambdaFunction} breaches 0", + {} + ] + }, + "AlarmName": { + "Fn::Sub": [ + "Lambda_Errors_\${EventsRuleLambdaFunction}", + {} + ] + }, + "ComparisonOperator": "GreaterThanThreshold", + "Dimensions": [ + { + "Name": "FunctionName", + "Value": { + "Ref": "EventsRuleLambdaFunction" + } + } + ], + "EvaluationPeriods": 1, + "MetricName": "Errors", + "Namespace": "AWS/Lambda", + "OKActions": [], + "Period": 60, + "Statistic": "Sum", + "Threshold": 0, + "TreatMissingData": "notBreaching" + }, + "Type": "AWS::CloudWatch::Alarm" + }, "slicWatchLambdaErrorsAlarmHelloLambdaFunction": { "Properties": { "ActionsEnabled": true, @@ -4208,6 +4265,80 @@ exports[`serverless-test-project/tests/snapshot/serverless-test-project-snapshot }, "Type": "AWS::CloudWatch::Alarm" }, + "slicWatchLambdaThrottlesAlarmEventsRuleLambdaFunction": { + "Properties": { + "ActionsEnabled": true, + "AlarmActions": [ + "test-topic" + ], + "AlarmDescription": { + "Fn::Sub": [ + "Throttles % for \${EventsRuleLambdaFunction} breaches 0", + {} + ] + }, + "AlarmName": { + "Fn::Sub": [ + "Lambda_Throttles_\${EventsRuleLambdaFunction}", + {} + ] + }, + "ComparisonOperator": "GreaterThanThreshold", + "EvaluationPeriods": 1, + "Metrics": [ + { + "Id": "throttles_pc", + "Expression": "(throttles / ( throttles + invocations )) * 100", + "Label": "% Throttles", + "ReturnData": true + }, + { + "Id": "throttles", + "MetricStat": { + "Metric": { + "Namespace": "AWS/Lambda", + "MetricName": "Throttles", + "Dimensions": [ + { + "Name": "FunctionName", + "Value": { + "Ref": "EventsRuleLambdaFunction" + } + } + ] + }, + "Period": 60, + "Stat": "Sum" + }, + "ReturnData": false + }, + { + "Id": "invocations", + "MetricStat": { + "Metric": { + "Namespace": "AWS/Lambda", + "MetricName": "Invocations", + "Dimensions": [ + { + "Name": "FunctionName", + "Value": { + "Ref": "EventsRuleLambdaFunction" + } + } + ] + }, + "Period": 60, + "Stat": "Sum" + }, + "ReturnData": false + } + ], + "OKActions": [], + "Threshold": 0, + "TreatMissingData": "notBreaching" + }, + "Type": "AWS::CloudWatch::Alarm" + }, "slicWatchLambdaThrottlesAlarmHelloLambdaFunction": { "Properties": { "ActionsEnabled": true, diff --git a/test-utils/sls-test-utils.ts b/test-utils/sls-test-utils.ts index 4c8311e4..e4368d3d 100644 --- a/test-utils/sls-test-utils.ts +++ b/test-utils/sls-test-utils.ts @@ -5,7 +5,7 @@ import pino from 'pino' const extras = ['levels', 'silent', 'onChild', 'trace', 'debug', 'info', 'warn', 'error', 'fatal'] const pinoLogger = pino() export const dummyLogger = Object.fromEntries( - Object.entries(pinoLogger).filter(([key]) => !extras.includes(key as string)) + Object.entries(pinoLogger).filter(([key]) => !extras.includes(key)) ) export const pluginUtils = { log: dummyLogger } diff --git a/test-utils/snapshot-utils.ts b/test-utils/snapshot-utils.ts index 9a8a6e83..06b589a1 100644 --- a/test-utils/snapshot-utils.ts +++ b/test-utils/snapshot-utils.ts @@ -20,9 +20,9 @@ export function formatSnapshot (template: Template): string { */ export function sortObject (obj: object): object { const sortedObj: Record = {} - for (const [key, value] of Object.entries(obj).toSorted(([a], [b]) => (a as string).localeCompare(b as string))) { + for (const [key, value] of Object.entries(obj).sort(([a], [b]) => (a).localeCompare(b))) { if (typeof value === 'object' && value !== null && !Array.isArray(value)) { - const obj = value as any + const obj = value sortedObj[key] = sortObject(typeof obj.toJSON === 'function' ? obj.toJSON() : obj) } else { sortedObj[key] = value