Search in sources :

Example 1 with ServiceURLBinding

use of com.creditease.uav.profiling.spi.ProfileServiceMapMgr.ServiceURLBinding in project uavstack by uavorg.

the class MonitorUrlFilterMgr method serviceValidate.

public boolean serviceValidate(String appId, String reUrl, String[] urlInfos) {
    if (profileValidate) {
        /**
         * NOTE: if not in profile services, do not collect;
         */
        ProfileServiceMapMgr smgr = (ProfileServiceMapMgr) UAVServer.instance().getServerInfo("profile.servicemapmgr");
        ServiceURLBinding sub = smgr.searchServiceURLBinding(appId, reUrl);
        if (sub == null) {
            return false;
        }
        String urlId = urlInfos[2];
        // rewrite pathparam url
        urlId = urlId.substring(0, urlId.indexOf(sub.getPathPattern())) + sub.getPath();
        urlInfos[2] = urlId;
    }
    return true;
}
Also used : ServiceURLBinding(com.creditease.uav.profiling.spi.ProfileServiceMapMgr.ServiceURLBinding) ProfileServiceMapMgr(com.creditease.uav.profiling.spi.ProfileServiceMapMgr)

Aggregations

ProfileServiceMapMgr (com.creditease.uav.profiling.spi.ProfileServiceMapMgr)1 ServiceURLBinding (com.creditease.uav.profiling.spi.ProfileServiceMapMgr.ServiceURLBinding)1