actuator 去掉 按照url 统计数据

 

actuator 去掉 按照url查询数据

    @Bean
    @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE)
    public SgWebFluxTagsProvider webFluxRequestProvider() {
        return new SgWebFluxTagsProvider();
    }

    @Bean
    @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
    public SgWebMvcTagsProvider WebMvcTagsProvider() {
        return new SgWebMvcTagsProvider();
    }

    static class SgWebFluxTagsProvider implements WebFluxTagsProvider {
        @Override
        public Iterable<Tag> httpRequestTags(ServerWebExchange exchange, Throwable ex) {
            return new ArrayList<>();
        }
    }

    static class SgWebMvcTagsProvider implements WebMvcTagsProvider {
        @Override
        public Iterable<Tag> getTags(final HttpServletRequest request,
                                     final HttpServletResponse response,
                                     final Object handler,
                                     final Throwable exception) {
            return new ArrayList<>();
        }

        @Override
        public Iterable<Tag> getLongRequestTags(final HttpServletRequest request, final Object handler) {
            return new ArrayList<>();
        }
    }

 

上一篇:MapReduce Java API实例-排序


下一篇:Springboot信息泄露以及heapdump MAT分析