-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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(logs): add support for fieldIndexPolicies in log group L2 Construct #33416
Conversation
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)
Clarification Request |
Hi @yashkh-amzn thank you for contributing! I see the PR is missing integ tests and read me changes. To learn more about our integ test process and how to make them you can refer to this doc. As for README changes they will presumably go here. Note that until the linter and build passes this PR won't show up on our radar to review. Let us know if there is anything else you need clarifying. |
Hey @aaythapa, I had a sync up with your team during the CDK office hours. I was told that the CDK team first wanted to align with the business logic and hence it was okay to submit a PR first for an initial review. Once there would be an alignment, I can update the integ tests and README. |
Ah ok, thanks for letting me know. I'll bring this up with the team and wait for a response |
}); | ||
}); | ||
|
||
test('set field index policy positive test', () => { |
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.
what is the difference between this test and one above
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.
Good catch! This was a dedup. I'll remove this test case.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33416 +/- ##
=======================================
Coverage 82.21% 82.21%
=======================================
Files 119 119
Lines 6876 6876
Branches 1162 1162
=======================================
Hits 5653 5653
Misses 1120 1120
Partials 103 103
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
1 similar comment
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
1321c9d
to
8fc94cc
Compare
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Removing the |
import * as kinesisfirehose from '@aws-cdk/aws-kinesisfirehose'; | ||
|
||
|
||
const logGroupDestination = new LogGroup(this, 'LogGroupLambdaAudit', { |
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.
for my understanding, could you please explain the purpose of defining log group destination and s3 destination in this code reference as i don't see it being used later while defining fieldIndexPolicy.
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 wasn't needed. Fixed it by removing all the unnecessary references.
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.
Thanks @yashkh-amzn, for field index policies you'll need to add the import in rosetta file,
https://github.com/yashkh-amzn/aws-cdk/blob/feature/loggroup-indexing/packages/aws-cdk-lib/rosetta/aws_logs/default.ts-fixture or modify it as logs.LogGroup
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.
Yes, I'm using logs.LogGroup
. Take a look at the latest commit
5a5a45d
to
9f5ed65
Compare
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
#33366
Closes #33366
Reason for this change
Field Indexing for CloudWatch Logs (CWL) was launched in Nov 2024. A lot of CWL customers are asking for indexing support in L2 construct. This feature will enable that property under FieldIndexPolicies as a JSON object in the LogGroup construct.
Description of changes
The change here is just populating the
fieldIndexPolicies
property of the LogGroup CFN with the list of fields provided by the user. The format of this property will be like this:Describe any new or updated permissions being added
No new permissions have been added.
Description of how you validated changes
Added unit tests. Will add integ tests after getting a confirmation from the CDK team on the implementation.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license