class SpringMessageTracerBeanPostProcessor implements BeanPostProcessor, PriorityOrdered {

    private String appName;

    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName)
                                                                               throws BeansException {<FILL_FUNCTION_BODY>}

    @Override
    public int getOrder() {
        return LOWEST_PRECEDENCE;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }
}

        if (bean instanceof AbstractMessageChannel) {
            Assert
                .isTrue(StringUtils.hasText(appName), TRACER_APPNAME_KEY + " must be configured!");
            ((AbstractMessageChannel) bean).addInterceptor(SofaTracerChannelInterceptor
                .create(appName));
        }
        return bean;
    
<no_super_class>