path: util/aop/aop-api/src/main/java/com/knubisoft/aop/api/impl/SlowHttpRequestProcessingAspect.java

This aspect has a pretty straightforward task, it counts each HTTP request execution time.

SlowHttpRequestProcessingAspect annotated with @ConditionalOnExpression("${aop.api.enabled:true}"), so to 'enable' this aspect you must set the property aop.api.enabled within the application.yaml to true.

Also, you have to set a duration value in the delaysTracking section within the application.yaml, property delaysTracking.api-duration acts like a threshold from which the aspect is based when deciding if an HTTP request is slow.

If the execution time exceeds the threshold, the aspect logs the details and notifies the developer that a slow HTTP request is detected.

  • No labels