Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a CloudWatch dashboard to the CDK deployment for enhanced observability.
- Introduces new properties (allRegions and envSlug) in global-apex-stack.ts and environment.ts to support multi-region metrics.
- Adds a custom Dashboard construct to create several GraphWidgets for API requests, API errors, Lambda invocations, maximum Lambda duration, and SQS oldest message age.
- Updates documentation in README.md to reflect the new observability features.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| aws/lib/global-apex-stack.ts | Added Dashboard construct with multi-region CloudWatch metrics. |
| aws/lib/environment.ts | Updated GlobalApexStack initialization to pass new dashboard props. |
| aws/README.md | Added Observability section describing the new CloudWatch dashboard. |
Comments suppressed due to low confidence (2)
aws/lib/global-apex-stack.ts:87
- The metric label for API Errors uses only the region name which may cause ambiguity between 4xx and 5xx error metrics. Consider appending the metric type (e.g.,
${region}-${metric}) to the label for clearer identification.
for (const metric of ['4xx', '5xx']) {
aws/lib/global-apex-stack.ts:49
- [nitpick] Naming the Construct as 'Dashboard' could be confusing since it shares the same name as the CloudWatch Dashboard object. Consider renaming the construct (e.g., 'CloudWatchDashboard') to differentiate it.
const dashboard = new cw.Dashboard(this, 'Dashboard', {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What It Does
Adds a CloudWatch dashboard to the CDK deployment.
Related Issues