Closed
Description
Use case
https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html reports that "None" is a valid unit for CloudWatch metrics, but the MetricUnit
enum does not have a member for this unit.
The lack of such a member means that there is no way to create metrics with unit "None" via Powertools. One cannot pass the string "None"
as the unit
parameter of Metric.add_metric
, due to this code.
Solution/User Experience
Of course, I realize that a MetricUnit
member for "None" cannot be named None
, but can a member with a different name (perhaps named None_
or NoUnit
) please be added to the enum?
Alternative solutions
No response
Acknowledgment
- This feature request meets Powertools for AWS Lambda (Python) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Java, TypeScript, and .NET
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Shipped