use of org.apache.synapse.aspects.flow.statistics.log.templates.AsynchronousExecutionEvent in project wso2-synapse by wso2.
the class OpenEventCollector method reportFlowAsynchronousEvent.
/**
* Enqueue StatisticOpenEvent for asynchronous invocation.
*
* @param messageContext synapse message context.
*/
public static void reportFlowAsynchronousEvent(MessageContext messageContext) {
if (shouldReportStatistic(messageContext)) {
BasicStatisticDataUnit dataUnit = new BasicStatisticDataUnit();
dataUnit.setStatisticId(StatisticDataCollectionHelper.getStatisticTraceId(messageContext));
dataUnit.setCurrentIndex(StatisticDataCollectionHelper.getParentFlowPosition(messageContext, null));
AsynchronousExecutionEvent asynchronousExecutionEvent = new AsynchronousExecutionEvent(dataUnit);
if (isOpenTracingEnabled()) {
OpenTracingManagerHolder.getOpenTracingManager().getHandler().handleOpenFlowAsynchronousEvent(dataUnit, messageContext);
}
addEventAndIncrementCount(messageContext, asynchronousExecutionEvent);
}
}
Aggregations