Skip to content
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

feat(logging): enable queue rotation #3656

Merged

Conversation

NikaHsn
Copy link
Member

@NikaHsn NikaHsn commented Aug 30, 2023

Issue #, if available:

Description of changes:

  • add queue rotation
  • next: to use queue rotation when log store is full

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

@NikaHsn NikaHsn requested a review from a team as a code owner August 30, 2023 22:46
@NikaHsn NikaHsn force-pushed the feat/logging/rotation branch from 1436155 to 31702e4 Compare August 30, 2023 23:50
@NikaHsn NikaHsn force-pushed the feat/logging/rotation branch from 31702e4 to c985bd1 Compare August 31, 2023 17:22
@NikaHsn NikaHsn force-pushed the feat/logging/rotation branch from c985bd1 to 94ce621 Compare August 31, 2023 17:35
Copy link
Contributor

@dnys1 dnys1 left a comment

Choose a reason for hiding this comment

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

I'm not sure this is the right interface for this. enableQueueRotation implies a persistent change IMO vs. something like rotate. But I feel more strongly that this should be a new method, maybe shiftItem which is this logic and addItem, or pop/rotate which is called independently before addItem.

Copy link
Member Author

@NikaHsn NikaHsn left a comment

Choose a reason for hiding this comment

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

if the name of enableQueueRotation implies a persistant change It can be renamed to rotate or withRotation. the way I see it is a parameter for the addItem method and passed for each method invocation then it only applies to that method call and is not a persistent change.
re adding a new method: let's assume we add a new method called shiftItem then callers need to apply a logic to decide if use addItem or shiftItem. by adding a flag to addItem method the use is easier as they just need to pass the flag to the addItem. so I'm not sure if should add a new method.

@NikaHsn NikaHsn merged commit 091b6af into aws-amplify:feat/logging/cloudwatch Aug 31, 2023
@NikaHsn NikaHsn deleted the feat/logging/rotation branch October 13, 2023 21:34
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.

3 participants