Skip to content

Commit

Permalink
fix(metrics): Rename purgeStoredMetrics() function usage in CDK examp…
Browse files Browse the repository at this point in the history
…le (#424)
  • Loading branch information
ijemmy authored Jan 6, 2022
1 parent 5a03c94 commit 02f0eae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/cdk/lib/example-function.MyFunction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const handler = async (_event: unknown, context: Context): Promise<void>
metricWithItsOwnDimensions.addDimension('InnerDimension', 'true');
metricWithItsOwnDimensions.addMetric('single-metric', MetricUnits.Percent, 50);

metrics.purgeStoredMetrics();
metrics.publishStoredMetrics();
metrics.raiseOnEmptyMetrics();

// ### Experiment tracer
Expand Down
2 changes: 1 addition & 1 deletion packages/metrics/tests/unit/Metrics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ describe('Class: Metrics', () => {
await new LambdaFunction().handler(dummyEvent, dummyContext.helloworldContext, () => console.log('Lambda invoked!'));
});

test('Purge Stored Metrics should log and clear', async () => {
test('Publish Stored Metrics should log and clear', async () => {
const metrics = new Metrics({ namespace: 'test' });
class LambdaFunction implements LambdaInterface {
@metrics.logMetrics()
Expand Down

0 comments on commit 02f0eae

Please sign in to comment.