diff options
author | Eric Eastwood <erice@element.io> | 2023-07-05 10:22:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-05 10:22:21 -0500 |
commit | ce857c05d5f6fa6b66c4a59c4917c440c9b98047 (patch) | |
tree | 5beb7f37736f40ed30ef10c2007236d75cb74583 /synapse/storage/databases/main/media_repository.py | |
parent | docs/admin_api: fix header level on 'Users' page (#15852) (diff) | |
download | synapse-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/storage/databases/main/media_repository.py')
-rw-r--r-- | synapse/storage/databases/main/media_repository.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/storage/databases/main/media_repository.py b/synapse/storage/databases/main/media_repository.py index fa8be214ce..8cebeb5189 100644 --- a/synapse/storage/databases/main/media_repository.py +++ b/synapse/storage/databases/main/media_repository.py @@ -27,6 +27,7 @@ from typing import ( ) from synapse.api.constants import Direction +from synapse.logging.opentracing import trace from synapse.storage._base import SQLBaseStore from synapse.storage.database import ( DatabasePool, @@ -328,6 +329,7 @@ class MediaRepositoryStore(MediaRepositoryBackgroundUpdateStore): "get_local_media_ids", _get_local_media_ids_txn ) + @trace async def store_local_media( self, media_id: str, @@ -447,6 +449,7 @@ class MediaRepositoryStore(MediaRepositoryBackgroundUpdateStore): desc="get_local_media_thumbnails", ) + @trace async def store_local_thumbnail( self, media_id: str, @@ -568,6 +571,7 @@ class MediaRepositoryStore(MediaRepositoryBackgroundUpdateStore): desc="get_remote_media_thumbnails", ) + @trace async def get_remote_media_thumbnail( self, origin: str, @@ -599,6 +603,7 @@ class MediaRepositoryStore(MediaRepositoryBackgroundUpdateStore): desc="get_remote_media_thumbnail", ) + @trace async def store_remote_media_thumbnail( self, origin: str, |