diff --git a/examples/cdk/lib/example-function.MyFunction.ts b/examples/cdk/lib/example-function.MyFunction.ts index 2e8e778427..a33268afa1 100644 --- a/examples/cdk/lib/example-function.MyFunction.ts +++ b/examples/cdk/lib/example-function.MyFunction.ts @@ -29,7 +29,7 @@ export const handler = async (_event: unknown, context: Context): Promise // ### Experiment metrics metrics.captureColdStartMetric(); - metrics.raiseOnEmptyMetrics(); + metrics.throwOnEmptyMetrics(); metrics.setDefaultDimensions({ environment: 'example', type: 'standardFunction' }); metrics.addMetric('test-metric', MetricUnits.Count, 10); @@ -38,7 +38,7 @@ export const handler = async (_event: unknown, context: Context): Promise metricWithItsOwnDimensions.addMetric('single-metric', MetricUnits.Percent, 50); metrics.purgeStoredMetrics(); - metrics.raiseOnEmptyMetrics(); + metrics.throwOnEmptyMetrics(); // ### Experiment tracer diff --git a/examples/cdk/lib/example-function.MyFunctionWithDecorator.ts b/examples/cdk/lib/example-function.MyFunctionWithDecorator.ts index 9715539f74..35cede722c 100644 --- a/examples/cdk/lib/example-function.MyFunctionWithDecorator.ts +++ b/examples/cdk/lib/example-function.MyFunctionWithDecorator.ts @@ -15,7 +15,7 @@ export class MyFunctionWithDecorator { @logger.injectLambdaContext() @metrics.logMetrics({ captureColdStartMetric: true, - raiseOnEmptyMetrics: true, + throwOnEmptyMetrics: true, defaultDimensions: { environment: 'example', type: 'withDecorator' }, }) public handler(_event: unknown, _context: Context, _callback: Callback): void | Promise {