Spring boot 执行器度量标记PathVariable和通配符

Spring boot 执行器度量标记PathVariable和通配符,spring-boot,spring-boot-actuator,Spring Boot,Spring Boot Actuator,我使用SpringBoot2执行器度量来统计API请求。但我面临一些问题,我没有找到这么多相关的文件 导致4xx响应的请求总数 导致5xx响应的请求总数 一, 我可以用 获取状态400信息,但我想知道是否有任何方法可以通配符4xx请求?或者我必须在代码中逐个循环所有4xx状态代码 二, @GetMapping(“/{type}/{code}”) 公共Mono GetLocationByType和Code( @NotNull@PathVariable(“类型”)最终字符串类型, @NotNull@

我使用SpringBoot2执行器度量来统计API请求。但我面临一些问题,我没有找到这么多相关的文件

导致4xx响应的请求总数

导致5xx响应的请求总数

一,

我可以用 获取状态400信息,但我想知道是否有任何方法可以通配符4xx请求?或者我必须在代码中逐个循环所有4xx状态代码

二,

@GetMapping(“/{type}/{code}”)
公共Mono GetLocationByType和Code(
@NotNull@PathVariable(“类型”)最终字符串类型,
@NotNull@PathVariable(“代码”)最终字符串代码){
我在控制器中使用PathVariable参数,但在 {type}/{code}

我收到了400个错误的请求


我是Spring Boot Actuator的新手,非常感谢您的帮助!

1:要获取您可以使用的所有4xx错误:
?tag=output:CLIENT\u ERROR


2:括号需要URL编码:
?tag=uri:/locations/%7Btype%7D/%7Bcode%7D
1:要获取所有可以使用的4xx错误:
?tag=output:CLIENT\u ERROR

2:括号需要URL编码:
?tag=uri:/locations/%7Btype%7D/%7Bcode%7D

  @GetMapping("/{type}/{code}")
  public Mono<ResponseEntity<Location>> getLocationByTypeAndCode(
  @NotNull @PathVariable("type") final String type,
  @NotNull @PathVariable("code") final String code) {