コード例 #1
0
        private static Dictionary <string, object> ProcessResponseAttributes(HttpResponse response)
        {
            var responseAttributes = new Dictionary <string, object>();

            int statusCode = (int)response.StatusCode;

            responseAttributes["status"] = statusCode;

            AgentUtil.MarkEntityFromStatus(statusCode);

            return(responseAttributes);
        }
コード例 #2
0
        private static Dictionary <string, object> PopulateResponseAttributes(HttpResponse response)
        {
            var responseAttributes = new Dictionary <string, object>();

            int statusCode = (int)response.StatusCode;

            AgentUtil.MarkEntityFromStatus(statusCode);

            responseAttributes["status"] = statusCode;

            if (response.Headers.ContentLength != null)
            {
                responseAttributes["content_length"] = response.Headers.ContentLength;
            }

            return(responseAttributes);
        }
コード例 #3
0
        /// <summary>
        /// Process response
        /// </summary>
        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
            };

            AgentUtil.MarkEntityFromStatus(statusCode);

            responseInformation["content_length"] = contentLength;
            AWSXRayRecorder.Instance.AddHttpInformation("response", responseInformation);
        }