Skip to content
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

aws-cloudwatch: Metrics must support 6 new advanced statistics #21666

Closed
2 tasks
j-schwerer opened this issue Aug 18, 2022 · 2 comments · Fixed by #23074
Closed
2 tasks

aws-cloudwatch: Metrics must support 6 new advanced statistics #21666

j-schwerer opened this issue Aug 18, 2022 · 2 comments · Fixed by #23074
Labels
@aws-cdk/aws-cloudwatch Related to Amazon CloudWatch effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@j-schwerer
Copy link

Describe the feature

As listed on https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html, CloudWatch metrics now support 12 statistics which can be used at graphing or alarming time. Statistics include trimmed mean, percentile rank, etc. - which come with a syntax similar to that of percentiles.

Use Case

Need to create alarms and graphs using trimmed mean or percentile rank

Proposed Solution

aws-cloudwatch/lib/metric.ts - review comment lines 24-35, replace "percentile" with a more generic "advanced stat" line 392

Implement advanced stat logic in aws-cloudwatch/lib/private/statistic.ts - function parseStatistic
Instead of returning just the percentile value, return the actual syntax p99, and add tm, pr, tc, ts… to the list of supported advanced statistics.

I understand lines 24-35 of metric.ts should update https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.MetricOptions.html

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.38

Environment details (OS name and version, etc.)

N/A

@j-schwerer j-schwerer added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Aug 18, 2022
@github-actions github-actions bot added the @aws-cdk/aws-cloudwatch Related to Amazon CloudWatch label Aug 18, 2022
@peterwoodworth peterwoodworth added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Aug 20, 2022
@peterwoodworth
Copy link
Contributor

Thanks for submitting this, it might be technically possible to do this already, but the documentation certainly isn't updated enough for that

We accept contributions! Check out our contributing guide if you're interested - there's a low chance the team will be able to address this soon but we'd be happy to review a PR 🙂

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-cloudwatch Related to Amazon CloudWatch effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
3 participants