in sdk/src/Handlers/System.Net/Utils/RequestUtil.cs [94:121]
private static void ProcessResponse(HttpStatusCode httpStatusCode, long? contentLength)
{
if (AWSXRayRecorder.Instance.IsTracingDisabled())
{
_logger.DebugFormat("Tracing is disabled. Not ending a subsegment on HTTP response.");
return;
}
var statusCode = (int)httpStatusCode;
var responseInformation = new Dictionary<string, object> { ["status"] = statusCode };
if (statusCode >= 400 && statusCode <= 499)
{
AWSXRayRecorder.Instance.MarkError();
if (statusCode == 429)
{
AWSXRayRecorder.Instance.MarkThrottle();
}
}
else if (statusCode >= 500 && statusCode <= 599)
{
AWSXRayRecorder.Instance.MarkFault();
}
responseInformation["content_length"] = contentLength;
AWSXRayRecorder.Instance.AddHttpInformation("response", responseInformation);
}