use of org.apache.synapse.aspects.flow.statistics.data.raw.StatisticDataUnit in project wso2-synapse by wso2.
the class PublishingEventTest method init.
/**
* Initializing PublishingEvent before tests.
*/
@BeforeClass
public static void init() {
StatisticDataUnit statisticDataUnit = new StatisticDataUnit();
statisticDataUnit.setTime(START_TIME);
PROPERTY_MAP.put("1", new Integer(1));
statisticDataUnit.setContextPropertyMap(PROPERTY_MAP);
StatisticsLog statisticsLog = new StatisticsLog(statisticDataUnit);
statisticsLog.setComponentType(ComponentType.ENDPOINT);
statisticsLog.setComponentName(COMPONENT_NAME);
statisticsLog.setComponentId(COMPONENT_ID);
statisticsLog.setEndTime(END_TIME);
statisticsLog.setChildren(Arrays.asList(CHILDREN));
statisticsLog.incrementNoOfFaults();
statisticsLog.setHashCode(HASHCODE);
publishingEvent = new PublishingEvent(FLOW_ID, COMPONENT_INDEX, statisticsLog, ENTRY_POINT, ENTRY_POINT_HASH_CODE);
publishingEvent.setBeforePayload(BEFORE_PAYLOAD);
publishingEvent.setAfterPayload(AFTER_PAYLOAD);
}
use of org.apache.synapse.aspects.flow.statistics.data.raw.StatisticDataUnit in project wso2-synapse by wso2.
the class JaegerSpanHandler method handleStateStackInsertion.
@Override
public void handleStateStackInsertion(MessageContext synCtx, String seqName, SequenceType seqType) {
TracingScope tracingScope = tracingScopeManager.getTracingScope(synCtx);
synchronized (tracingScope.getSpanStore()) {
ContinuationStateSequenceInfo continuationStateSequenceInfo = findContinuationStateSequenceInfo(seqType, tracingScope.getSpanStore(), false);
if (continuationStateSequenceInfo != null) {
StatisticDataUnit statisticDataUnit = continuationStateSequenceInfo.getStatisticDataUnit();
continuationStateSequenceInfo.setSpanActive(true);
startSpan(statisticDataUnit, synCtx, tracingScope.getSpanStore());
}
}
}
Aggregations