1
0

Use HTTP_HOST attribute

This commit is contained in:
Eric Eastwood
2022-07-30 02:07:46 -05:00
parent 070195afee
commit 7772f50e60
2 changed files with 2 additions and 3 deletions

View File

@@ -524,7 +524,7 @@ class MatrixFederationHttpClient:
"outgoing-federation-request",
kind=SpanKind.CLIENT,
attributes={
SpanAttributes.PEER_ADDRESS: request.destination,
SpanAttributes.HTTP_HOST: request.destination,
SpanAttributes.HTTP_METHOD: request.method,
SpanAttributes.HTTP_URL: request.path,
},

View File

@@ -822,8 +822,7 @@ def trace_servlet(
SynapseTags.REQUEST_ID: request.get_request_id(),
SpanAttributes.HTTP_METHOD: request.get_method(),
SpanAttributes.HTTP_URL: request.get_redacted_uri(),
# TODO: Is this the correct attribute to use for this?
SpanAttributes.NET_PEER_IP: request.getClientAddress().host,
SpanAttributes.HTTP_HOST: request.getClientAddress().host,
}
request_name = request.request_metrics.name