Feature request: log a warning when no metric is emitted #1291
Labels
completed
This item is complete and has been merged/shipped
feature-request
This item refers to a feature request for an existing or new utility
metrics
This item relates to the Metrics Utility
Use case
As a customer, I want to see a warning log in my Lambda functions that are using the
logMetrics
decorator or middleware, if no metric is emitted.This warning log will help users of the Metrics utility to detect instances in which the utility is present in the code, but not being really used. With this information they can then decide whether they want to remove the utility or fix issues related to metrics not being emitted correctly.
This feature is present in the Powertools for Python version, and was discussed here: aws-powertools/powertools-lambda-python#1926
Solution/User Experience
If no metric is emitted the utility should emit a log that says:
Alternative solutions
No response
Acknowledgment
The text was updated successfully, but these errors were encountered: