mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-02 15:46:02 -04:00
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.
This commit is contained in:
parent
116a4c8340
commit
7fbf42499d
16 changed files with 62 additions and 46 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue