Skip to content

Commit 771622f

Browse files
authoredOct 9, 2023
Merge pull request #2413 from alphagov/ignore-signon-permissions-tokens
Ignore reporting signon permission token expiry metrics
2 parents 4a30c14 + c79c39a commit 771622f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/collectors/global_prometheus_collector.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def metrics
2525
def token_expiry_info
2626
# Cache metric to prevent needless expensive calls to the database
2727
Rails.cache.fetch("token_expiry_info", expires_in: 1.hour) do
28-
ApiUser.all.flat_map do |user|
28+
ApiUser.where.not(email: SSOPushCredential::USER_EMAIL).flat_map do |user|
2929
user.authorisations.where(revoked_at: nil).map do |token|
3030
{
3131
expires_at: token.expires_at.to_i,

0 commit comments

Comments
 (0)
Please sign in to comment.