@Override
    public void onEvent(Event originEvent) {
        if (!Tracers.isEnable()) {
            return;
        }
        Class eventClass = originEvent.getClass();

        if (eventClass == RestServerReceiveEvent.class) {
            RestServerReceiveEvent event = (RestServerReceiveEvent) originEvent;
            RestTracerAdapter.serverReceived(event.getRequest());
        } else if (eventClass == RestServerSendEvent.class) {
            RestServerSendEvent event = (RestServerSendEvent) originEvent;
            RestTracerAdapter.serverSend(event.getResponse(), event.getThrowable());
        }
    }
@author <a href="mailto:zhanggeng.zg@antfin.com">zhanggeng</a>
tracer/tracer-opentracing-resteasy/src/main/java/com/alipay/sofa/rpc/event/RestTracerSubscriber.java