@@ -228,8 +228,11 @@ export class BackEnd extends Construct {
228
228
) . toString ( )
229
229
) . toString ( ) ;
230
230
231
- solutionsMetrics . addLambdaInvocationCount ( imageHandlerLambdaFunction . functionName ) ;
232
- solutionsMetrics . addLambdaBilledDurationMemorySize ( [ imageHandlerLogGroup ] , "BilledDurationMemorySizeQuery" ) ;
231
+ solutionsMetrics . addLambdaInvocationCount ( { functionName : imageHandlerLambdaFunction . functionName } ) ;
232
+ solutionsMetrics . addLambdaBilledDurationMemorySize ( {
233
+ logGroups : [ imageHandlerLogGroup ] ,
234
+ queryDefinitionName : "BilledDurationMemorySizeQuery" ,
235
+ } ) ;
233
236
solutionsMetrics . addQueryDefinition ( {
234
237
logGroups : [ imageHandlerLogGroup ] ,
235
238
queryString : new QueryString ( {
@@ -246,8 +249,14 @@ export class BackEnd extends Construct {
246
249
queryDefinitionName : "RequestInfoQuery" ,
247
250
} ) ;
248
251
249
- solutionsMetrics . addCloudFrontMetric ( conditionalCloudFrontDistributionId , "Requests" ) ;
250
- solutionsMetrics . addCloudFrontMetric ( conditionalCloudFrontDistributionId , "BytesDownloaded" ) ;
252
+ solutionsMetrics . addCloudFrontMetric ( {
253
+ distributionId : conditionalCloudFrontDistributionId ,
254
+ metricName : "Requests" ,
255
+ } ) ;
256
+ solutionsMetrics . addCloudFrontMetric ( {
257
+ distributionId : conditionalCloudFrontDistributionId ,
258
+ metricName : "BytesDownloaded" ,
259
+ } ) ;
251
260
252
261
Aspects . of ( solutionsMetrics ) . add ( new ConditionAspect ( props . sendAnonymousStatistics ) ) ;
253
262
0 commit comments