-
Notifications
You must be signed in to change notification settings - Fork 7
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
Added workflow to index events from s3 data lake to metrics cluster #89
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #89 +/- ##
============================================
+ Coverage 83.57% 84.52% +0.94%
- Complexity 202 228 +26
============================================
Files 56 61 +5
Lines 1236 1370 +134
Branches 51 57 +6
============================================
+ Hits 1033 1158 +125
- Misses 181 189 +8
- Partials 22 23 +1 ☔ View full report in Codecov by Sentry. |
c4ed1f5
to
ace97ba
Compare
@Slf4j | ||
public class GithubEventsLambda extends AbstractBaseLambda { | ||
private final String[] eventsToIndex = {"issues.opened", | ||
"issues.closed", |
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.
Please add them as enums.
}); | ||
|
||
// Create OpenSearch Metrics Lambda setup | ||
const openSearchMetricsWorkflowStack = new OpenSearchMetricsWorkflowStack(app, 'OpenSearchMetrics-Workflow', { | ||
opensearchDomainStack: openSearchDomainStack, vpcStack: vpcStack, lambdaPackage: Project.LAMBDA_PACKAGE |
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.
Please seperate this into a seperate lambda and a seperate stepfunction so that it wont mix up with existing metrics and can have its own cron and full 15 mins to execute the operation.
} | ||
} | ||
openSearchUtil.createIndexIfNotExists("github-events"); | ||
openSearchUtil.bulkIndex("github-events", finalEventData); |
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.
Please add as github-events-MM-YYY"
, this way we can clean up older data easily if required.
|
||
@Override | ||
public Void handleRequest(Void input, Context context) { | ||
final String yesterday = LocalDate.now(ZoneOffset.UTC).minus(1, ChronoUnit.DAYS).toString(); // yyyy-MM-dd |
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.
Please change yesterday
to something like collectionStartTime
and add comments that will default to yesterday.
bfb1524
to
d6b592c
Compare
d6b592c
to
076b2b0
Compare
Signed-off-by: Brandon Shien <bshien@amazon.com>
076b2b0
to
c6b32d5
Compare
Description
Added lambda to index events from s3 data lake to metrics cluster
Issues Resolved
Part of #76
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.