Skip to content

Docs: Rename purgeStoredMetrics() function usage in CDK example #423

Closed
@ijemmy

Description

@ijemmy

Bug description

In #377 , we renamed the function from purgeStoredMetrics() to publishStoredMetrics(). We missed one reference in the CDK example project. Also, we still use the term purge in one of the unit tests.

grep -rn -i "purge" . --exclude=\*venv\* --exclude=\*.git\* --exclude=\*node_modules\* --exclude=\*cdk.out\* --exclude=\*.js\* --exclude=\*.d.ts\* --exclude=\*.html\*

./examples/cdk/lib/example-function.MyFunction.ts:40:  metrics.purgeStoredMetrics();
./packages/metrics/tests/unit/Metrics.test.ts:514:    test('Purge Stored Metrics should log and clear', async () => { 

Expected Behavior

There should be no compilation issue

Current Behavior

There's a compilation issue from purgeStoredMetrics() usage

Possible Solution

Change from "purge" to "publish"

Steps to Reproduce

N/A

Environment

  • Powertools version used: 0.2.0
  • Packaging format (Layers, npm): npm
  • AWS Lambda function runtime: N/A
  • Debugging logs: N/A

Related issues, RFCs

#377

Metadata

Metadata

Assignees

Labels

completedThis item is complete and has been merged/shippedinternalPRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)metricsThis item relates to the Metrics Utility

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions