diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-05-04 14:11:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-04 14:11:21 -0400 |
commit | 7fbf42499d92ec3c9a05d9f36ec5fecd1ab1f18c (patch) | |
tree | 5f3a08745f204376a211aa3ece6f92f4108a9891 /synapse/logging/opentracing.py | |
parent | Implement changes to MSC2285 (hidden read receipts) (#12168) (diff) | |
download | synapse-7fbf42499d92ec3c9a05d9f36ec5fecd1ab1f18c.tar.xz |
Use `getClientAddress` instead of `getClientIP`. (#12599)
getClientIP was deprecated in Twisted 18.4.0, which also added getClientAddress. The Synapse minimum version for Twisted is currently 18.9.0, so all supported versions have the new API.
Diffstat (limited to 'synapse/logging/opentracing.py')
-rw-r--r-- | synapse/logging/opentracing.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/logging/opentracing.py b/synapse/logging/opentracing.py index f86ee9aac7..a02b5bf6bd 100644 --- a/synapse/logging/opentracing.py +++ b/synapse/logging/opentracing.py @@ -884,7 +884,7 @@ def trace_servlet(request: "SynapseRequest", extract_context: bool = False): tags.SPAN_KIND: tags.SPAN_KIND_RPC_SERVER, tags.HTTP_METHOD: request.get_method(), tags.HTTP_URL: request.get_redacted_uri(), - tags.PEER_HOST_IPV6: request.getClientIP(), + tags.PEER_HOST_IPV6: request.getClientAddress().host, } request_name = request.request_metrics.name |