Search in sources :

Example 1 with ParentReopenEvent

use of org.apache.synapse.aspects.flow.statistics.log.templates.ParentReopenEvent in project wso2-synapse by wso2.

the class OpenEventCollector method openContinuationEvents.

/**
 * Add event in to the event queue. This event will inform statistic collection to put all the flow continuable
 * mediators before the index specified by current Index to open state.
 *
 * @param synCtx synapse message context.
 */
public static void openContinuationEvents(MessageContext synCtx) {
    if (shouldReportStatistic(synCtx)) {
        BasicStatisticDataUnit basicStatisticDataUnit = new BasicStatisticDataUnit();
        basicStatisticDataUnit.setCurrentIndex(StatisticDataCollectionHelper.getParentFlowPosition(synCtx, null));
        basicStatisticDataUnit.setStatisticId(StatisticDataCollectionHelper.getStatisticTraceId(synCtx));
        ParentReopenEvent parentReopenEvent = new ParentReopenEvent(basicStatisticDataUnit);
        addEvent(synCtx, parentReopenEvent);
        if (isOpenTracingEnabled()) {
            OpenTracingManagerHolder.getOpenTracingManager().getHandler().handleOpenContinuationEvents(basicStatisticDataUnit, synCtx);
        }
    }
}
Also used : ParentReopenEvent(org.apache.synapse.aspects.flow.statistics.log.templates.ParentReopenEvent) BasicStatisticDataUnit(org.apache.synapse.aspects.flow.statistics.data.raw.BasicStatisticDataUnit)

Aggregations

BasicStatisticDataUnit (org.apache.synapse.aspects.flow.statistics.data.raw.BasicStatisticDataUnit)1 ParentReopenEvent (org.apache.synapse.aspects.flow.statistics.log.templates.ParentReopenEvent)1