@Override
  public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {

    buildMDC(servletRequest);
    try {
      filterChain.doFilter(servletRequest, servletResponse);
    } finally {
      clear();
    }
  }
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