Class RestCommunicationAspect

java.lang.Object
kieker.monitoring.probe.aspectj.spring.RestCommunicationAspect

public class RestCommunicationAspect
extends java.lang.Object
Aspect for transmitting the Kieker traceId and orderIndex from a caller application to a callee application with Spring.
Since:
1.14
  • Constructor Summary

    Constructors 
    Constructor Description
    RestCommunicationAspect()  
  • Method Summary

    Modifier and Type Method Description
    void doAfterRequestCreation​(org.springframework.http.client.ClientHttpRequest request)
    After a request creation with a RestTemplate, we get the current traceId and orderIndex and add them to the Http header of our message.
    void doBeforeDispatcherService​(javax.servlet.http.HttpServletRequest request)
    Before an incoming message is processed by the service method of Spring, we read the traceId and orderIndex from the Http header of our message.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • doBeforeDispatcherService

      public void doBeforeDispatcherService​(javax.servlet.http.HttpServletRequest request)
      Before an incoming message is processed by the service method of Spring, we read the traceId and orderIndex from the Http header of our message. If existing, we create a new BeforeReceivedEvent and pass it to the MonitoringController.
    • doAfterRequestCreation

      public void doAfterRequestCreation​(org.springframework.http.client.ClientHttpRequest request)
      After a request creation with a RestTemplate, we get the current traceId and orderIndex and add them to the Http header of our message. Also, we create a new BeforeSentEvent, which we pass to the MonitoringController.