-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(rum): add L2 AppMonitor construct with log group access #35250
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
Open
pahud
wants to merge
14
commits into
aws:main
Choose a base branch
from
pahud:fix-35107
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
aws-cdk-automation
previously requested changes
Aug 16, 2025
Collaborator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This review is outdated)
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
contribution/core
This is a PR that came from AWS.
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
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.
Issue # (if applicable)
Closes #35107.
Reason for this change
AWS CloudWatch RUM users need programmatic access to the CloudWatch log group that RUM creates when
cwLogEnabledis set totrue. This is essential for common use cases such as:Currently, users can only access the low-level
CfnAppMonitorconstruct, which doesn't provide a convenient way to reference the associated log group. This forces users to manually construct log group names using complex CloudFormation references or hardcode naming patterns, which is error-prone and not maintainable.The requested feature enables users to build sophisticated monitoring and alerting systems on top of RUM data, such as automatically paging engineering teams when critical performance issues are detected in real-user monitoring data.
Description of changes
This PR introduces a new L2
AppMonitorconstruct for the aws-rum-alpha module that provides comprehensive CloudWatch RUM functionality with seamless log group integration:Core Implementation:
Resourceand implementsIAppMonitorinterface following established CDK L2 patterns and conventionslogGroupgetter property that returns anILogGroupinterface whencwLogEnabledis true, enabling seamless integration with other CDK constructsFn.sub(),Fn.split(), andFn.select()intrinsic functions to dynamically construct the log group name patternRUMService_${name}${id.slice(0,8)}without requiring hardcoded valuesfromAppMonitorAttributes()static method for importing existing AppMonitor resources with full functionality preservationcwLogEnabledis false, with suggestions for proper configurationKey Technical Decisions:
ILogGroupinterface that works seamlessly with all existing CDK log-related constructs (subscription filters, retention policies, permissions, etc.)Alternatives Considered:
CfnAppMonitor- rejected due to L1 construct design principlesDesign Decisions:
Describe any new or updated permissions being added
N/A - This change does not introduce any new IAM permissions or security implications. The L2 construct uses the same underlying
AWS::RUM::AppMonitorCloudFormation resource as the existing L1 construct.Description of how you validated changes
Unit Tests:
fromAppMonitorAttributes()Integration Tests:
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license