Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ijemmy opened this issue Jan 6, 2022 · 1 comment · Fixed by #424
Closed

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

ijemmy opened this issue Jan 6, 2022 · 1 comment · Fixed by #424
Assignees
Labels
completed This item is complete and has been merged/shipped internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) metrics This item relates to the Metrics Utility

Comments

@ijemmy
Copy link
Contributor

ijemmy commented Jan 6, 2022

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

@ijemmy ijemmy added bug Something isn't working triage This item has not been triaged by a maintainer, please wait labels Jan 6, 2022
@ijemmy ijemmy changed the title fix(examples): Remove purgeStoredMetrics() function usage in examples/cdk folder fix(metrics): Rename purgeStoredMetrics() function usage in CDK example Jan 6, 2022
@dreamorosi dreamorosi added internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) metrics This item relates to the Metrics Utility and removed triage This item has not been triaged by a maintainer, please wait labels Jan 6, 2022
@dreamorosi dreamorosi added this to the production-ready-release milestone Jan 6, 2022
@dreamorosi dreamorosi linked a pull request Jan 6, 2022 that will close this issue
12 tasks
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2022

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@dreamorosi dreamorosi changed the title fix(metrics): Rename purgeStoredMetrics() function usage in CDK example Docs: Rename purgeStoredMetrics() function usage in CDK example Nov 14, 2022
@dreamorosi dreamorosi added completed This item is complete and has been merged/shipped and removed bug Something isn't working labels Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed This item is complete and has been merged/shipped internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) metrics This item relates to the Metrics Utility
Projects
None yet
2 participants