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

feat(cloudwatch): Stats factory class for metric strings #23172

Merged
merged 5 commits into from Nov 30, 2022
Merged

Commits on Nov 30, 2022

  1. feat(cloudwatch): Stats factory class for metric strings

    The `Statistic` enum type was incorrectly publicly exposed (it should
    only have been visible internally to the package), and was enhanced in
    PR #23074 to have more enum values such as `P10`, `P50`, `P99_9`, etc.
    
    The stringification of this `Statistic` type would only have worked in
    TypeScript anyway (in JSII languages like Java and Python we cannot rely
    on the string values of enums), and the fact that enums cannot be
    parameterized made it so that we used to have a lot of redundant enum
    values.
    
    Introduce a new factory class, `Stats`, whose sole purpose is to
    produce formatted strings to use as CloudWatch `statistic` values,
    and advertise the use of this class.
    
    (We probably shouldn't have been using `string` as the type in the first
    place, but given that we are factories to produce them seems to be the
    next best thing).
    rix0rrr committed Nov 30, 2022
    Copy the full SHA
    affbd93 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    8c155d5 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    87e036c View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    8d887be View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    55116fa View commit details
    Browse the repository at this point in the history