diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2021-08-24 10:17:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-24 09:17:51 +0000 |
commit | 15db8b7c7f13f33ca49104183e0642892c3b83f1 (patch) | |
tree | 4f6a5027d588c9d92e320b7ed9aa163d0e80daa6 /synapse/handlers/sso.py | |
parent | doc: add django-oauth-toolkit to oidc doc (#10192) (diff) | |
download | synapse-15db8b7c7f13f33ca49104183e0642892c3b83f1.tar.xz |
Correctly initialise the `synapse_user_logins` metric. (#10677)
Fix a bug where the prometheus metrics for SSO logins wouldn't be initialised until the first user logged in with a given auth provider.
Diffstat (limited to 'synapse/handlers/sso.py')
-rw-r--r-- | synapse/handlers/sso.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/handlers/sso.py b/synapse/handlers/sso.py index 1b855a685c..0e6ebb574e 100644 --- a/synapse/handlers/sso.py +++ b/synapse/handlers/sso.py @@ -37,6 +37,7 @@ from twisted.web.server import Request from synapse.api.constants import LoginType from synapse.api.errors import Codes, NotFoundError, RedirectException, SynapseError from synapse.config.sso import SsoAttributeRequirement +from synapse.handlers.register import init_counters_for_auth_provider from synapse.handlers.ui_auth import UIAuthSessionDataConstants from synapse.http import get_request_user_agent from synapse.http.server import respond_with_html, respond_with_redirect @@ -213,6 +214,7 @@ class SsoHandler: p_id = p.idp_id assert p_id not in self._identity_providers self._identity_providers[p_id] = p + init_counters_for_auth_provider(p_id) def get_identity_providers(self) -> Mapping[str, SsoIdentityProvider]: """Get the configured identity providers""" |