Skip to content

Feature request: support metrics with unit "None" #4834

Closed
@ethantkoenig

Description

@ethantkoenig

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions