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

fix: apply account/region to more metrics #544

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

echeung-amzn
Copy link
Member

@echeung-amzn echeung-amzn commented Jul 12, 2024

Addressing a few misses from #533.

Also updates the test in MonitoringFacade.test.ts since XAXR alarms aren't possible.

Fixes #434, but only in cases where we can infer that the account/region is actually different from the construct scope to prevent unnecessary XAXR alarm errors.

Fixes #428, in cases where the account/region is actually different from the construct scope.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@echeung-amzn echeung-amzn added the do-not-merge Label to signify Mergify to not auto-merge. Useful for grouping PR merges into a single release. label Jul 12, 2024
@echeung-amzn echeung-amzn force-pushed the more-regions branch 3 times, most recently from 09543f1 to 8e391ea Compare July 12, 2024 18:05
@echeung-amzn echeung-amzn marked this pull request as draft July 12, 2024 18:05
mergify bot pushed a commit that referenced this pull request Jul 12, 2024
Pulling out irrelevant code cleanup from #544.

Also clarifying in docs that cross-region alarms are not supported by CloudWatch.

---

_By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license_
@echeung-amzn echeung-amzn force-pushed the more-regions branch 2 times, most recently from 2b0c08b to f061978 Compare July 12, 2024 21:41
@echeung-amzn echeung-amzn marked this pull request as ready for review July 31, 2024 20:32
return metricAccount;
}

return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the metricAccount is not defined? Do we want to return account in those cases or we default to not passing account (which resolves to same account)?

Same question for region below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they're not explicitly declared, it should just inherit what the deployment environment context is (i.e. whatever the stack is in, like what a Metric would normally do if you don't pass in account or region).

@echeung-amzn echeung-amzn merged commit 704d864 into cdklabs:main Aug 1, 2024
12 checks passed
@echeung-amzn echeung-amzn deleted the more-regions branch August 1, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge Label to signify Mergify to not auto-merge. Useful for grouping PR merges into a single release.
Projects
None yet
2 participants