From e379c239d9836517b712d5692c8c3817256c44cf Mon Sep 17 00:00:00 2001 From: Raimund S Date: Wed, 6 Sep 2023 15:30:48 +0200 Subject: [PATCH] Update check_sentryio_limits.py Be explicit that all limits are calculated per day also in the positive non-warn case --- src/check_sentryio_limits.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/check_sentryio_limits.py b/src/check_sentryio_limits.py index 14a19924..bc036e4a 100755 --- a/src/check_sentryio_limits.py +++ b/src/check_sentryio_limits.py @@ -159,7 +159,7 @@ def merge_dsns(results: List[dict], teams: List[dict]) -> None: exit = 1 print(f"WARNING: {team['summed_events']} " f"events are configured, but {args.per_team_limit} " - f"allowed for team: {team['slug']}") + f"allowed for team: {team['slug']} per day") # Check if organization wide limit is reached if args.organization_limit: @@ -172,7 +172,7 @@ def merge_dsns(results: List[dict], teams: List[dict]) -> None: exit = 1 print(f"WARNING: {organization['summed_events']} events are " f"configured, but {args.organization_limit} allowed in " - "total") + "total per day") # If team limit is hit but organization limit is not elif exit == 1: print(f"{organization['summed_events']} events are configured " @@ -181,7 +181,7 @@ def merge_dsns(results: List[dict], teams: List[dict]) -> None: # If neither team nor organization limit is hit if exit == 0: print(f"OK: {organization['summed_events']} " - "events are configured in total") + "events are configured per day in total") sys.exit(exit)