class SofaTracerConfigurationListener
                                            implements
                                            ApplicationListener<ApplicationEnvironmentPreparedEvent>,
                                            Ordered {

    @Override
    public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) {<FILL_FUNCTION_BODY>}

    @Override
    public int getOrder() {
        return ApplicationListenerOrderConstants.SOFA_TRACER_CONFIGURATION_LISTENER_ORDER;
    }
}

        if (SofaBootEnvUtils.isSpringCloudBootstrapEnvironment(event.getEnvironment())) {
            return;
        }

        ConfigurableEnvironment environment = event.getEnvironment();

        // check spring.application.name
        String applicationName = environment.getProperty(SofaBootConstants.APP_NAME_KEY);
        Assert.isTrue(StringUtils.hasText(applicationName), SofaBootConstants.APP_NAME_KEY
                                                            + " must be configured!");
        SofaTracerConfiguration.setProperty(SofaTracerConfiguration.TRACER_APPNAME_KEY,
            applicationName);

        Binder binder = Binder.get(environment);
        SofaTracerProperties sofaTracerProperties = new SofaTracerProperties();
        Bindable<SofaTracerProperties> bindable = Bindable.of(SofaTracerProperties.class)
            .withExistingValue(sofaTracerProperties);
        binder.bind("sofa.boot.tracer", bindable);

        //properties convert to tracer
        SofaTracerConfiguration.setProperty(
            SofaTracerConfiguration.DISABLE_MIDDLEWARE_DIGEST_LOG_KEY,
            sofaTracerProperties.getDisableDigestLog());
        SofaTracerConfiguration.setProperty(SofaTracerConfiguration.DISABLE_DIGEST_LOG_KEY,
            sofaTracerProperties.getDisableConfiguration());
        SofaTracerConfiguration.setProperty(SofaTracerConfiguration.TRACER_GLOBAL_ROLLING_KEY,
            sofaTracerProperties.getTracerGlobalRollingPolicy());
        SofaTracerConfiguration.setProperty(SofaTracerConfiguration.TRACER_GLOBAL_LOG_RESERVE_DAY,
            sofaTracerProperties.getTracerGlobalLogReserveDay());
        //stat log interval
        SofaTracerConfiguration.setProperty(SofaTracerConfiguration.STAT_LOG_INTERVAL,
            sofaTracerProperties.getStatLogInterval());
        //baggage length
        SofaTracerConfiguration.setProperty(
            SofaTracerConfiguration.TRACER_PENETRATE_ATTRIBUTE_MAX_LENGTH,
            sofaTracerProperties.getBaggageMaxLength());
        SofaTracerConfiguration.setProperty(
            SofaTracerConfiguration.TRACER_SYSTEM_PENETRATE_ATTRIBUTE_MAX_LENGTH,
            sofaTracerProperties.getBaggageMaxLength());

        //sampler config
        if (sofaTracerProperties.getSamplerName() != null) {
            SofaTracerConfiguration.setProperty(SofaTracerConfiguration.SAMPLER_STRATEGY_NAME_KEY,
                sofaTracerProperties.getSamplerName());
        }
        if (StringUtils.hasText(sofaTracerProperties.getSamplerCustomRuleClassName())) {
            SofaTracerConfiguration.setProperty(
                SofaTracerConfiguration.SAMPLER_STRATEGY_CUSTOM_RULE_CLASS_NAME,
                sofaTracerProperties.getSamplerCustomRuleClassName());
        }
        SofaTracerConfiguration.setProperty(
            SofaTracerConfiguration.SAMPLER_STRATEGY_PERCENTAGE_KEY,
            String.valueOf(sofaTracerProperties.getSamplerPercentage()));

        SofaTracerConfiguration.setProperty(SofaTracerConfiguration.JSON_FORMAT_OUTPUT,
            String.valueOf(sofaTracerProperties.isJsonOutput()));
    
<no_super_class>