private void buildMDC(ServletRequest request) {
    if ((request instanceof HttpServletRequest) && MDC.getMDCAdapter() != null) {
      String url = ((HttpServletRequest) request).getRequestURI();
      Matcher matcher = pattern.matcher(url);
      if (matcher.find()) {
        MDC.put("viewName", matcher.group(1));
        MDC.put("viewVersion", matcher.group(2));
        MDC.put("viewInstanceName", matcher.group(3));
      }
    }
  }
Inserts view name, view version and view instance name into MDC info for views REST for logging in views.
ambari-server/src/main/java/org/apache/ambari/server/view/AmbariViewsMDCLoggingFilter.java