Skip to content

Commit

Permalink
Set indexer and service metric alarm threshold to one per day (#6284)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsotirho-ucsc committed Oct 10, 2024
1 parent 36e1ba5 commit d54245e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/azul/chalice.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,9 +588,11 @@ def metric_alarms(self) -> Iterator[metric_alarm]:
# The api_handler lambda functions (indexer & service) aren't
# included in the app_module's handler_map, so we account for those
# first.
threshold = 1 if metric == LambdaMetric.errors else 0
period = 24 * 60 * 60 if metric == LambdaMetric.errors else 5 * 60
yield self.metric_alarm(metric=metric,
threshold=0,
period=5 * 60).bind(self)
threshold=threshold,
period=period).bind(self)
for handler_name, handler in self.handler_map.items():
if isinstance(handler, chalice.app.EventSourceHandler):
try:
Expand Down

0 comments on commit d54245e

Please sign in to comment.