public static Sampler setSampler(final String sampler) {
        if (StringUtils.isBlank(sampler)) {
            return globalSampler;
        } else {
            return CountSampler.create(sampler);
        }
    }
set api sample.

@param sampler sample
@return Sampler
shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-common/src/main/java/org/apache/shenyu/plugin/logging/common/utils/LogCollectConfigUtils.java