Tag /send_join responses to detect faster joins (#14950)

* Tag /send_join responses to detect faster joins

* Changelog

* Define a proper SynapseTag

* isort
This commit is contained in:
David Robertson 2023-01-31 12:43:20 +00:00 committed by GitHub
parent 805b641fb6
commit 3b8574b4f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View file

@ -62,7 +62,9 @@ from synapse.logging.context import (
run_in_background,
)
from synapse.logging.opentracing import (
SynapseTags,
log_kv,
set_tag,
start_active_span_from_edu,
tag_args,
trace,
@ -678,6 +680,10 @@ class FederationServer(FederationBase):
room_id: str,
caller_supports_partial_state: bool = False,
) -> Dict[str, Any]:
set_tag(
SynapseTags.SEND_JOIN_RESPONSE_IS_PARTIAL_STATE,
caller_supports_partial_state,
)
await self._room_member_handler._join_rate_per_room_limiter.ratelimit( # type: ignore[has-type]
requester=None,
key=room_id,