我有一个应用程序,可以将指标导出到 Prometheus --debug
。 Prometheus/actuator/prometheus
每 5 秒调用一次,这会导致以下结果
2018-09-03 17:47:49.995 DEBUG 8241 --- [nio-8081-exec-2] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:47:49.996 DEBUG 8241 --- [nio-8081-exec-2] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:47:54.995 DEBUG 8241 --- [nio-8081-exec-3] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:47:54.996 DEBUG 8241 --- [nio-8081-exec-3] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:47:59.996 DEBUG 8241 --- [nio-8081-exec-5] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:47:59.997 DEBUG 8241 --- [nio-8081-exec-5] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:48:04.995 DEBUG 8241 --- [nio-8081-exec-4] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:48:04.996 DEBUG 8241 --- [nio-8081-exec-4] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:48:09.996 DEBUG 8241 --- [nio-8081-exec-6] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:48:09.997 DEBUG 8241 --- [nio-8081-exec-6] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:48:14.995 DEBUG 8241 --- [nio-8081-exec-7] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:48:14.996 DEBUG 8241 --- [nio-8081-exec-7] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:48:19.995 DEBUG 8241 --- [nio-8081-exec-8] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:48:19.996 DEBUG 8241 --- [nio-8081-exec-8] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:48:24.996 DEBUG 8241 --- [nio-8081-exec-9] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:48:24.996 DEBUG 8241 --- [nio-8081-exec-9] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:48:29.995 DEBUG 8241 --- [io-8081-exec-10] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:48:29.996 DEBUG 8241 --- [io-8081-exec-10] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-09-03 17:48:34.995 DEBUG 8241 --- [nio-8081-exec-1] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped to public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
为了补充日志记录方面的最新改进,我认为如果可以的话,我们应该尝试改进此日志。