Created
December 12, 2022 21:28
-
-
Save fsanal/90d7bdd0b542d7798bf5807d69ae2c68 to your computer and use it in GitHub Desktop.
This file contains 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
public AnalyticsEventMonitor(final Construct scope, final String id, final AnalyticsEventMonitorProps props) { | |
super(scope, id); | |
lambdaExecutionRole = props.getLambdaExecutionRole(); | |
dlqTopics = props.getDlqTopics(); | |
infraLambda = props.getInfraLambda(); | |
getProperties(); | |
monitoringAlarms.addAll(props.getKinesisPipelines().stream() | |
.map(pipeline -> | |
KinesisAlarmSystem.Builder.create(this, String.format("%sAlarmSystem", pipeline.getNode().getId())) | |
.kinesisPipeline(pipeline) | |
.build() | |
.getMonitoringAlarms()) | |
.flatMap(Collection::stream) | |
.collect(Collectors.toList())); | |
monitoringAlarms.addAll( | |
ApiGatewayAlarmSystem.Builder.create(this, String.format("%sAlarmSystem", props.getApi().getNode().getId())) | |
.api(props.getApi()) | |
.build() | |
.getMonitoringAlarms() | |
); | |
monitoringTopic = createCloudwatchAlarmTopic(); | |
monitoringLambda = createAnalyticsInfraMonitoringLambda(); | |
createMonitoringSubscriptions(); | |
createAlarmEventBridge(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment