summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-08-22 13:41:57 +0100
committerErik Johnston <erik@matrix.org>2019-08-22 13:41:57 +0100
commit1e4b4d85e7f4604d0617bba01b279f3dc2ced1d2 (patch)
tree99baa32e4bc755be4c21f5d711b07a86bfff8020 /synapse/api/auth.py
parentMake changelog entry be a feature (diff)
parentMerge pull request #5850 from matrix-org/erikj/retry_well_known_on_fail (diff)
downloadsynapse-1e4b4d85e7f4604d0617bba01b279f3dc2ced1d2.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/reliable_lookups
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r--synapse/api/auth.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index 179644852a..7b3a5a8221 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -22,6 +22,7 @@ from netaddr import IPAddress
 
 from twisted.internet import defer
 
+import synapse.logging.opentracing as opentracing
 import synapse.types
 from synapse import event_auth
 from synapse.api.constants import EventTypes, JoinRules, Membership
@@ -178,6 +179,7 @@ class Auth(object):
     def get_public_keys(self, invite_event):
         return event_auth.get_public_keys(invite_event)
 
+    @opentracing.trace
     @defer.inlineCallbacks
     def get_user_by_req(
         self, request, allow_guest=False, rights="access", allow_expired=False
@@ -209,6 +211,7 @@ class Auth(object):
             user_id, app_service = yield self._get_appservice_user_id(request)
             if user_id:
                 request.authenticated_entity = user_id
+                opentracing.set_tag("authenticated_entity", user_id)
 
                 if ip_addr and self.hs.config.track_appservice_user_ips:
                     yield self.store.insert_client_ip(
@@ -259,6 +262,7 @@ class Auth(object):
                 )
 
             request.authenticated_entity = user.to_string()
+            opentracing.set_tag("authenticated_entity", user.to_string())
 
             return synapse.types.create_requester(
                 user, token_id, is_guest, device_id, app_service=app_service