AOP Monitoring
The Spring Aspect-Oriented-Programming (AOP) framework within Cloud Hot Folders adds extra monitoring and metrics, over and above what exists in the standard implementation. Spring integration and AOP interceptors add logging around the default hot folder tasks and converters. The manifest aspect configuration and the additional monitoring steps are outlined in this section.
Interceptors record information about files as they’re processed through the flow. If you extend the out-of-the-box hot folder tasks and converter interfaces, your custom components are instrumented in the same way. If you choose to implement your own tasks or converters, then add your own AOP monitors to retain this level of logging.
Aspect Configuration
Aspects are Spring beans that perform logic in or around the method they’re declared to intercept. Most of our monitoring aspects are configured in <HYBRIS_BIN_DIR>/ext-cloud/cloudhotfolder/resources/integration/hotfolder-aop-spring.xml.
<aop:config>
<aop:aspect ref="fileUnzippedAspectBean">
<aop:around method="aroundUnzipped"
pointcut="bean(unZipTransformer) and execution(* doTransform(..)) and args(message)" />
</aop:aspect>
<aop:aspect ref="batchHeaderAspectBean" id="zipBatchHeaderAspect">
<aop:around method="aroundMessageSetup"
pointcut="execution(* de.hybris.platform.cloud.hotfolder.dataimport.batch.zip.task.ZipHeaderSetupTask.execute(..)) and args(message)"/>
...
...
</aop:aspect>
<aop:aspect ref="batchHeaderAspectBean" id="fileBatchHeaderAspect">
<aop:around method="aroundFileSetup"
pointcut="execution(* de.hybris.platform.acceleratorservices.dataimport.batch.task.HeaderSetupTask.execute(..)) and args(file)"/>
...
...
</aop:aspect>
</aop:config>
More Monitoring Steps
The steps in the table are wrapped with extra monitoring capabilities.
| Step | Notes |
|---|---|
| Downloaded | The Azure Blob integration currently provides information on the length of time it took to download a file, as well as the file size. |
| File Routed | This step isn’t recorded on files that are routed successfully. It’s a warning for files NOT routed. |
| File Unzipped | This step is used to record how long it took to unzip a file that is ready to be processed. |
| Header Setup | This step is used to record how long it took to set up the BatchHeader and ZipBatchHeader. |
| Header Initialized | This step is used to record how long it took to initialize the BatchHeader and ZipBatchHeader. |
| Header Transformed | This step is used to record how long it took to transform any raw CSVs to Impex in the BatchHeader and ZipBatchHeader. |
| Header Executed |
This step is used to record how long it took to execute all the Impex files in the BatchHeader and ZipBatchHeader. It also records the time to complete the task and the result of each Impex run as a separate action. |
| Header Cleanup | This step is used to record how long it took to clean up converted files and to move the original files into the archive directory. |