private static void PublishAuthData(HttpContextBase context)
        {
            if (context == null)
            {
                return;
            }
            IActivityScope currentActivityScope = ServiceCommonMetadataPublisher.GetCurrentActivityScope(context);

            if (currentActivityScope == null)
            {
                return;
            }
            Dictionary <Enum, string> authValues = context.GetAuthValues();

            foreach (KeyValuePair <Enum, string> keyValuePair in authValues)
            {
                currentActivityScope.SetProperty(keyValuePair.Key, keyValuePair.Value);
            }
        }
        private static void PublishGeneric(HttpContextBase context)
        {
            IActivityScope currentActivityScope = ServiceCommonMetadataPublisher.GetCurrentActivityScope(context);

            if (currentActivityScope == null)
            {
                return;
            }
            ServiceCommonMetadataPublisher.PublishServerInfo(currentActivityScope);
            if (context == null)
            {
                return;
            }
            HttpRequestBase  request  = context.Request;
            HttpResponseBase response = context.Response;
            string           value    = request.GetRequestHeader("X-Forwarded-For");

            if (string.IsNullOrEmpty(value))
            {
                value = request.UserHostAddress;
            }
            currentActivityScope.SetProperty(ServiceCommonMetadata.ClientIpAddress, value);
            currentActivityScope.SetProperty(ActivityStandardMetadata.ClientInfo, request.UserAgent);
            currentActivityScope.SetProperty(ServiceCommonMetadata.RequestSize, request.ContentLength.ToString());
            if (currentActivityScope.GetProperty(ServiceCommonMetadata.HttpStatus) == null)
            {
                currentActivityScope.SetProperty(ServiceCommonMetadata.HttpStatus, response.StatusCode.ToString());
            }
            if (request.Cookies.Count > 0)
            {
                for (int i = 0; i < request.Cookies.Count; i++)
                {
                    if (string.Equals(request.Cookies[i].Name, "exchangecookie", StringComparison.OrdinalIgnoreCase))
                    {
                        currentActivityScope.SetProperty(ServiceCommonMetadata.Cookie, request.Cookies[i].Value);
                        return;
                    }
                }
            }
        }