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 voiddoAfterRequestCreation(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.voiddoBeforeDispatcherService(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.
-
Constructor Details
-
RestCommunicationAspect
public RestCommunicationAspect()
-
-
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.
-