summary refs log tree commit diff
path: root/synapse/media/media_repository.py
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2023-07-05 10:22:21 -0500
committerGitHub <noreply@github.com>2023-07-05 10:22:21 -0500
commitce857c05d5f6fa6b66c4a59c4917c440c9b98047 (patch)
tree5beb7f37736f40ed30ef10c2007236d75cb74583 /synapse/media/media_repository.py
parentdocs/admin_api: fix header level on 'Users' page (#15852) (diff)
downloadsynapse-ce857c05d5f6fa6b66c4a59c4917c440c9b98047.tar.xz
Add tracing to media `/upload` endpoint (#15850)
Add tracing instrumentation to media `/upload` code paths to investigate https://github.com/matrix-org/synapse/issues/15841
Diffstat (limited to 'synapse/media/media_repository.py')
-rw-r--r--synapse/media/media_repository.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/media/media_repository.py b/synapse/media/media_repository.py
index e81c987b10..4b750c700b 100644
--- a/synapse/media/media_repository.py
+++ b/synapse/media/media_repository.py
@@ -35,6 +35,7 @@ from synapse.api.errors import (
 from synapse.config.repository import ThumbnailRequirement
 from synapse.http.site import SynapseRequest
 from synapse.logging.context import defer_to_thread
+from synapse.logging.opentracing import trace
 from synapse.media._base import (
     FileInfo,
     Responder,
@@ -174,6 +175,7 @@ class MediaRepository:
         else:
             self.recently_accessed_locals.add(media_id)
 
+    @trace
     async def create_content(
         self,
         media_type: str,
@@ -710,6 +712,7 @@ class MediaRepository:
         # Could not generate thumbnail.
         return None
 
+    @trace
     async def _generate_thumbnails(
         self,
         server_name: Optional[str],