Skip to content

fix(metrics): metadata and dimensions not cleared on publish - #1129

Merged
dreamorosi merged 2 commits into
aws-powertools:mainfrom
shdq:1115-metadata-and-dimensions-not-cleared-on-publish
Oct 26, 2022
Merged

fix(metrics): metadata and dimensions not cleared on publish#1129
dreamorosi merged 2 commits into
aws-powertools:mainfrom
shdq:1115-metadata-and-dimensions-not-cleared-on-publish

Conversation

@shdq

@shdq shdq commented Oct 21, 2022

Copy link
Copy Markdown
Contributor

Description of your changes

To fix this bug, clearDimensions(); and clearMetadata(); are added to publishStoredMetrics() method to clear metadata and dimensions.

Bug described and reproduced in #1115.

How to verify this change

Related issues, RFCs

Issue number: #1115

PR status

Is this ready for review?: YES
Is it a breaking change?: NO

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding changes to the examples
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • I have added tests that prove my change is effective and works
  • New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published in downstream module
  • The PR title follows the conventional commit semantics

Breaking change checklist

  • I have documented the migration process
  • I have added, implemented necessary warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions github-actions Bot added the bug Something isn't working label Oct 21, 2022

@dreamorosi dreamorosi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution.

The changes seem appropriate to me and the automated checks are green.

I have requested a second review by one of the other maintainers before merging.

@shdq

shdq commented Oct 24, 2022

Copy link
Copy Markdown
Contributor Author

Thank you, Andrea @dreamorosi. If you need help with other issues, feel free to mention me.

flochaz
flochaz previously approved these changes Oct 24, 2022
@flochaz
flochaz dismissed their stale review October 24, 2022 12:17

Doubt on Unit test . neeed a sec to review

@shdq

shdq commented Oct 26, 2022

Copy link
Copy Markdown
Contributor Author

Hello @flochaz, what is your doubt? Should I add more or fix existing tests?

@flochaz

flochaz commented Oct 26, 2022

Copy link
Copy Markdown
Contributor

Hello @flochaz, what is your doubt? Should I add more or fix existing tests?

Sorry got dragged on something else. Double checked and all good. approving. thx a lot for the work

@dreamorosi
dreamorosi merged commit b209c30 into aws-powertools:main Oct 26, 2022
@dreamorosi

Copy link
Copy Markdown
Contributor

Hi @shdq, the PR is merged and the change will be available in the next release. Congrats for getting your first PR merged in this project 🎉

To answer your question, I would start with issues that have the good-first-issue, or consider this one. If instead there's any other issue that interests you (except ones for Parameters & Idempotency which are already been worked on), feel free to comment under it & tag me and I'll be happy to give you more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants