This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Commit 3789a4f 1 parent 517654f commit 3789a4f Copy full SHA for 3789a4f
File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1070,7 +1070,7 @@ def trace_servlet(
1070
1070
tags .SPAN_KIND : tags .SPAN_KIND_RPC_SERVER ,
1071
1071
tags .HTTP_METHOD : request .get_method (),
1072
1072
tags .HTTP_URL : request .get_redacted_uri (),
1073
- tags .PEER_HOST_IPV6 : request .getClientAddress (). host ,
1073
+ tags .PEER_HOST_IPV6 : request .get_client_ip_if_available () ,
1074
1074
}
1075
1075
1076
1076
request_name = request .request_metrics .name
@@ -1091,9 +1091,11 @@ def trace_servlet(
1091
1091
# with JsonResource).
1092
1092
scope .span .set_operation_name (request .request_metrics .name )
1093
1093
1094
+ # Mypy seems to think that start_context.tag below can be Optional[str], but
1095
+ # that doesn't appear to be correct and works in practice.
1094
1096
request_tags [
1095
1097
SynapseTags .REQUEST_TAG
1096
- ] = request .request_metrics .start_context .tag
1098
+ ] = request .request_metrics .start_context .tag # type: ignore[assignment]
1097
1099
1098
1100
# set the tags *after* the servlet completes, in case it decided to
1099
1101
# prioritise the span (tags will get dropped on unprioritised spans)
You can’t perform that action at this time.
0 commit comments