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

Support metric rollup for different dimensionset values #69

Open
natangsalgia opened this issue Feb 24, 2021 · 1 comment
Open

Support metric rollup for different dimensionset values #69

natangsalgia opened this issue Feb 24, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@natangsalgia
Copy link

natangsalgia commented Feb 24, 2021

Currently, if a metric has dimensions and customers need to create alarms on metrics aggregated across all the values of the dimensions, customers need to emit the same metric with different combination of the dimensionset.

Example:

  1. DimensionSet: [d1, d2, d3]
  2. Possible Dimension Values: d1:[d1_1, d1_2]; d2:[d2_1, d2_2]; d3:[d3_1, d3_2]

If user wants to create alarms on all values of [d1, d2, d3], they need to add all combinations to the MetricsLogger.
[[d1, d2, d3],[d1, d2],[d1, d3],[d2, d3],[d1],[d2],[d3],[]]

Request here is to provide a mechanism in this library to automatically populate all combinations for the dimensions.

Example:
metricsLogger.putDimensionSetCombination(DimensionSet.of(d1, d1_1, d2, d2_2, d3, d3_1)) should add [[d1, d2, d3],[d1, d2],[d1, d3],[d2, d3],[d1],[d2],[d3],[]] as the dimensionset in the log.

@jaredcnance jaredcnance added the enhancement New feature or request label Feb 24, 2021
@Stephen-Bao
Copy link
Contributor

Hi @natangsalgia,
According to your description, you're trying to create CloudWatch Alarms on a specific metric name while aggregating over different dimensions. I believe there're multiple ways to do that:

  1. Using the metric math expression: https://stackoverflow.com/questions/60160703/cloudwatch-alarm-across-all-dimensions-based-on-metric-name-for-custom-metrics
  2. Using a new common dimension if applicable: https://stackoverflow.com/questions/48443899/cloudwatch-does-not-aggregate-across-dimensions-for-your-custom-metrics

From my point of view, publishing the same metric with different combination of the dimensionset wouldn't enable you to aggreate over dimensions. Maybe I'm getting something wrong here and if it's the case, feel free to provide me with more context about your application and I'll be more than happy to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants