Esempio n. 1
0
 public DefaultRequest(AmazonWebServiceRequest request, string serviceName)
 {
     if (request == null)
     {
         throw new ArgumentNullException("request");
     }
     if (string.IsNullOrEmpty(serviceName))
     {
         throw new ArgumentNullException("serviceName");
     }
     this.serviceName = serviceName;
     originalRequest  = request;
     requestName      = originalRequest.GetType().Name;
     UseSigV4         = ((IAmazonWebServiceRequest)originalRequest).UseSigV4;
 }
Esempio n. 2
0
        private void AddRequestSpecificInformation(Activity activity, IRequestContext requestContext, string service)
        {
            AmazonWebServiceRequest request = requestContext.OriginalRequest;

            if (ServiceParameterMap.TryGetValue(service, out string parameter))
            {
                var property = request.GetType().GetProperty(parameter);
                if (property != null)
                {
                    if (ParameterAttributeMap.TryGetValue(parameter, out string attribute))
                    {
                        activity.SetTag(attribute, property.GetValue(request));
                    }
                }
            }
        }