Skip to content

Add support to clear custom dimensions and configure flush behavior on dimensions#105

Merged
Stephen-Bao merged 8 commits intoawslabs:masterfrom
Stephen-Bao:clear-custom-dimensions
Aug 17, 2022
Merged

Add support to clear custom dimensions and configure flush behavior on dimensions#105
Stephen-Bao merged 8 commits intoawslabs:masterfrom
Stephen-Bao:clear-custom-dimensions

Conversation

@Stephen-Bao
Copy link
Copy Markdown
Contributor

@Stephen-Bao Stephen-Bao commented Jul 22, 2022

Issue #, if available:
#35, #91

Description of changes:
Added a resetDimensions(boolean useDefault) method for clearing custom dimensions; added a boolean field to MetricsLogger to control the behavior of whether to preserve custom dimensions after each flush(); adjusted README to reflect the correct behavior of flush() and new method.

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

@Stephen-Bao Stephen-Bao requested a review from paggynie July 22, 2022 15:16
Comment thread src/main/java/software/amazon/cloudwatchlogs/emf/model/MetricDirective.java Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
@Stephen-Bao Stephen-Bao requested review from markkuhn and paggynie July 27, 2022 14:12
@Stephen-Bao Stephen-Bao requested review from giancarlokc and markkuhn and removed request for giancarlokc and markkuhn August 3, 2022 16:02
Copy link
Copy Markdown
Contributor

@paggynie paggynie left a comment

Choose a reason for hiding this comment

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

just a minor comment that we can mention in README that customer only need to set once for setFlushPreserveDimensions(false) per metrics logger. right now customer may get confused to set it everytime before flush

@Stephen-Bao Stephen-Bao removed the request for review from Himtanaya August 16, 2022 13:33
@Stephen-Bao Stephen-Bao force-pushed the clear-custom-dimensions branch from 95af752 to a732313 Compare August 16, 2022 14:20
@markkuhn
Copy link
Copy Markdown
Contributor

Will this feature be added to the other EMF libraries?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

putDimension with same key is adding always new elements Support Clearing Custom Dimensions on MetricsLogger

3 participants