Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 94375f7

Browse files
Remove redundant opentracing spans for /sendToDevice and /keys/upload (#13574)
1 parent 06df5d4 commit 94375f7

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

changelog.d/13574.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix the `opentracing.force_tracing_for_users` config option not applying to [`/sendToDevice`](https://spec.matrix.org/v1.3/client-server-api/#put_matrixclientv3sendtodeviceeventtypetxnid) and [`/keys/upload`](https://spec.matrix.org/v1.3/client-server-api/#post_matrixclientv3keysupload) requests.

synapse/rest/client/keys.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
parse_string,
2727
)
2828
from synapse.http.site import SynapseRequest
29-
from synapse.logging.opentracing import log_kv, set_tag, trace_with_opname
29+
from synapse.logging.opentracing import log_kv, set_tag
3030
from synapse.types import JsonDict, StreamToken
3131

3232
from ._base import client_patterns, interactive_auth_handler
@@ -71,7 +71,6 @@ def __init__(self, hs: "HomeServer"):
7171
self.e2e_keys_handler = hs.get_e2e_keys_handler()
7272
self.device_handler = hs.get_device_handler()
7373

74-
@trace_with_opname("upload_keys")
7574
async def on_POST(
7675
self, request: SynapseRequest, device_id: Optional[str]
7776
) -> Tuple[int, JsonDict]:

synapse/rest/client/sendtodevice.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from synapse.http.server import HttpServer
2020
from synapse.http.servlet import assert_params_in_dict, parse_json_object_from_request
2121
from synapse.http.site import SynapseRequest
22-
from synapse.logging.opentracing import set_tag, trace_with_opname
22+
from synapse.logging.opentracing import set_tag
2323
from synapse.rest.client.transactions import HttpTransactionCache
2424
from synapse.types import JsonDict
2525

@@ -43,7 +43,6 @@ def __init__(self, hs: "HomeServer"):
4343
self.txns = HttpTransactionCache(hs)
4444
self.device_message_handler = hs.get_device_message_handler()
4545

46-
@trace_with_opname("sendToDevice")
4746
def on_PUT(
4847
self, request: SynapseRequest, message_type: str, txn_id: str
4948
) -> Awaitable[Tuple[int, JsonDict]]:

0 commit comments

Comments
 (0)