-
Notifications
You must be signed in to change notification settings - Fork 153
Feature request: Avoid flushing metrics when no metrics to flush #3023
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
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Hi @bml1g12, thank you for opening this feature request. From a first look, it seems that this could be related or at least have a good amount of overlap with #2036, would you mind taking a look and see if this is the case? If yes, I think we could close this and use the other. That issue hasn't been updated in a few months but I now see that in addition to this issue, there's a decent amount of interest by looking at the 👍, so it could be a good time to repriotize it. As a side note, v1 of Powertools for AWS Lambda (TypeScript) has reached end of life this week, so I would advise to consider upgrading to a more recent version in the v2.x line. |
Thanks @dreamorosi , I think that issue basically covers this request so will close it, although I notice in your response there you focus on the topic of removing the warning which is a good point and something I'd like to be able to hide; however I should note my main concern is the fact that we log an empty metric on top of that; so even if we disable the warning, we'd want to also disable the empty metric log.
In Powertools Python they do not log an empty metric at all, just the warning |
This issue is now closed. Please be mindful that future comments 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. |
Hi @bml1g12, thanks for the additional detail. I didn't understand it at first but in that case I agree with you and we shouldn't log the empty metric. I've reopened the issue so I can take a look at it irrespective of the other issue, which might take longer. |
This issue is now closed. Please be mindful that future comments 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. |
This is now released under v2.8.0 version! |
Use case
We are using
Metrics with this setup:
And if we do not log any metrics cloudwatch logs report what I think is a redundant log that makes logs a little harder to read through and of course expends a tiny amount of money to emit:
Solution/User Experience
I believe the AWS Powertools Library for Python does not produce such empty logs, I think the ideal behaviour would be to omit these logs entirely if there's no metrics to log?
Alternative solutions
Acknowledgment
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered: