Class TracingHandler

  • All Implemented Interfaces:
    com.amazonaws.handlers.IRequestHandler2

    public class TracingHandler
    extends com.amazonaws.handlers.RequestHandler2
    Extension of RequestHandler2 that intercepts requests made by AmazonWebServiceClients and generates corresponding subsegments. Operation-level customization of this request handler is by default performed based on the information contained in the file at "/com/amazonaws/xray/handlers/DefaultOperationParameterWhitelist.json").
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterError​(com.amazonaws.Request<?> request, com.amazonaws.Response<?> response, java.lang.Exception e)  
      void afterResponse​(com.amazonaws.Request<?> request, com.amazonaws.Response<?> response)  
      com.amazonaws.AmazonWebServiceRequest beforeExecution​(com.amazonaws.AmazonWebServiceRequest request)  
      void beforeRequest​(com.amazonaws.Request<?> request)  
      • Methods inherited from class com.amazonaws.handlers.RequestHandler2

        adapt, afterAttempt, beforeAttempt, beforeMarshalling, beforeUnmarshalling
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TracingHandler

        public TracingHandler()
      • TracingHandler

        public TracingHandler​(java.lang.String accountId)
      • TracingHandler

        public TracingHandler​(AWSXRayRecorder recorder,
                              java.lang.String accountId)
      • TracingHandler

        public TracingHandler​(java.net.URL operationParameterWhitelist)
      • TracingHandler

        public TracingHandler​(AWSXRayRecorder recorder,
                              java.net.URL operationParameterWhitelist)
      • TracingHandler

        public TracingHandler​(java.lang.String accountId,
                              java.net.URL operationParameterWhitelist)
      • TracingHandler

        public TracingHandler​(AWSXRayRecorder recorder,
                              java.lang.String accountId,
                              java.net.URL operationParameterWhitelist)
    • Method Detail

      • beforeExecution

        public com.amazonaws.AmazonWebServiceRequest beforeExecution​(com.amazonaws.AmazonWebServiceRequest request)
        Specified by:
        beforeExecution in interface com.amazonaws.handlers.IRequestHandler2
        Overrides:
        beforeExecution in class com.amazonaws.handlers.RequestHandler2
      • beforeRequest

        public void beforeRequest​(com.amazonaws.Request<?> request)
        Specified by:
        beforeRequest in interface com.amazonaws.handlers.IRequestHandler2
        Overrides:
        beforeRequest in class com.amazonaws.handlers.RequestHandler2
      • afterResponse

        public void afterResponse​(com.amazonaws.Request<?> request,
                                  com.amazonaws.Response<?> response)
        Specified by:
        afterResponse in interface com.amazonaws.handlers.IRequestHandler2
        Overrides:
        afterResponse in class com.amazonaws.handlers.RequestHandler2
      • afterError

        public void afterError​(com.amazonaws.Request<?> request,
                               com.amazonaws.Response<?> response,
                               java.lang.Exception e)
        Specified by:
        afterError in interface com.amazonaws.handlers.IRequestHandler2
        Overrides:
        afterError in class com.amazonaws.handlers.RequestHandler2