Search in sources :

Example 1 with TraceEventType

use of org.kie.kogito.tracing.event.trace.TraceEventType in project kogito-apps by kiegroup.

the class TraceEventConsumer method internalHandleCloudEvent.

@Override
protected void internalHandleCloudEvent(CloudEvent cloudEvent, TraceEvent payload) {
    TraceEventType traceEventType = payload.getHeader().getType();
    if (traceEventType == TraceEventType.DMN) {
        String sourceUrl = cloudEvent.getSource().toString();
        String serviceUrl = payload.getHeader().getResourceId().getServiceUrl();
        logEvent(payload);
        service.processDecision(cloudEvent.getId(), TraceEventConverter.toDecision(payload, sourceUrl, serviceUrl));
    } else {
        LOG.error("Unsupported TraceEvent type {}", traceEventType);
    }
}
Also used : TraceEventType(org.kie.kogito.tracing.event.trace.TraceEventType)

Aggregations

TraceEventType (org.kie.kogito.tracing.event.trace.TraceEventType)1