private void readServicesSamplingPolicy(SamplingPolicySettings samplingPolicySettings) {
        Map<String, Object> objectMap = (Map<String, Object>) yamlData;
        Object servicesObject = objectMap.get("services");
        if (servicesObject != null) {
            List<Map<String, Object>> serviceList = (List<Map<String, Object>>) servicesObject;
            serviceList.forEach(service -> {
                String name = (String) service.get("name");
                if (StringUtil.isBlank(name)) {
                    return;
                }
                SamplingPolicy samplingPolicy = new SamplingPolicy();
                samplingPolicy.setRate(service.get("rate") == null ? null : (Integer) service.get("rate"));
                samplingPolicy.setDuration(service.get("duration") == null ? null : (Integer) service.get("duration"));
                samplingPolicySettings.add(name, samplingPolicy);
            });
        }
    }
Read policy config file to {@link SamplingPolicySettings}
oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/sampling/SamplingPolicySettingsReader.java