Skip to content

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

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

Closed
2 tasks done
leandrodamascena opened this issue Aug 8, 2024 · 2 comments · Fixed by #2904
Closed
2 tasks done

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

leandrodamascena opened this issue Aug 8, 2024 · 2 comments · Fixed by #2904
Assignees
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

Comments

@leandrodamascena
Copy link
Contributor

Use case

Original issue: aws-powertools/powertools-lambda-python#4834

Consider changes to the TypeScript naming pattern in the text below.

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

Original issue: aws-powertools/powertools-lambda-python#4834

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

Future readers

Please react with 👍 and your use case to help us understand customer demand.

@leandrodamascena leandrodamascena added triage This item has not been triaged by a maintainer, please wait feature-request This item refers to a feature request for an existing or new utility labels Aug 8, 2024
@am29d am29d added metrics This item relates to the Metrics Utility confirmed The scope is clear, ready for implementation and removed triage This item has not been triaged by a maintainer, please wait labels Aug 8, 2024
@am29d am29d self-assigned this Aug 8, 2024
@am29d am29d moved this from Triage to Working on it in Powertools for AWS Lambda (TypeScript) Aug 8, 2024
@github-project-automation github-project-automation bot moved this from Working on it to Coming soon in Powertools for AWS Lambda (TypeScript) Aug 8, 2024
Copy link
Contributor

github-actions bot commented Aug 8, 2024

⚠️ COMMENT VISIBILITY 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.

@github-actions github-actions bot added pending-release This item has been merged and will be released soon and removed confirmed The scope is clear, ready for implementation labels Aug 8, 2024
Copy link
Contributor

github-actions bot commented Aug 8, 2024

This is now released under v2.7.0 version!

@github-actions github-actions bot added completed This item is complete and has been merged/shipped and removed pending-release This item has been merged and will be released soon labels Aug 8, 2024
@dreamorosi dreamorosi moved this from Coming soon to Shipped in Powertools for AWS Lambda (TypeScript) Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Development

Successfully merging a pull request may close this issue.

2 participants