Skip to content

Commit

Permalink
Merge pull request #2413 from alphagov/ignore-signon-permissions-tokens
Browse files Browse the repository at this point in the history
Ignore reporting signon permission token expiry metrics
  • Loading branch information
theseanything authored Oct 9, 2023
2 parents 4a30c14 + c79c39a commit 771622f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/collectors/global_prometheus_collector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def metrics
def token_expiry_info
# Cache metric to prevent needless expensive calls to the database
Rails.cache.fetch("token_expiry_info", expires_in: 1.hour) do
ApiUser.all.flat_map do |user|
ApiUser.where.not(email: SSOPushCredential::USER_EMAIL).flat_map do |user|
user.authorisations.where(revoked_at: nil).map do |token|
{
expires_at: token.expires_at.to_i,
Expand Down

0 comments on commit 771622f

Please sign in to comment.