public static Sampler create(final String probability) {
        if (StringUtils.isBlank(probability)) {
            return ALWAYS_SAMPLE;
        }
        if ("0".equals(probability)) {
            return NEVER_SAMPLE;
        }
        if ("1".equals(probability) || "1.0".equals(probability) || "1.0.0".equals(probability)) {
            return ALWAYS_SAMPLE;
        }
        float parseProbability = NumberUtils.toFloat(probability, 1);
        if (parseProbability < 0.01f || parseProbability > 1) {
            throw new IllegalArgumentException(
                    "probability should be between 0.01 and 1: was " + probability);
        }
        return new CountSampler(parseProbability);
    }
create a sampler instance.

@param probability probability
@return sampler instance
shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-common/src/main/java/org/apache/shenyu/plugin/logging/common/sampler/CountSampler.java