Prometheus requires that all meters with the same name have the same set of tag keys. There is already an existing meter containing tag keys [exception, method, status, uri]. The meter you are attempting to register has keys [method, status, uri].
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-server</artifactId>
<version>2.8.3</version>
</dependency>
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-autoconfigure-ui</artifactId>
<version>2.8.3</version>
</dependency>
然后在启动类上加上@zipkin.server.internal.EnableZipkinServer
或者 @zipkin.server.EnableZipkinServer(后一个已被弃用,暂时不清楚两个的区别);
自建zipkin服务启动后,访问localhost:9411,后台可能会报错:
java.lang.IllegalArgumentException: Prometheus requires that all meters with the same name have the same set of tag keys. There is already an existing meter containing tag keys [method, status, uri]. The meter you are attempting to register has keys [exception, method, status, uri].
可以不用关注这个问题,服务器一样能收集到日志,也可以有两种处理方式:
将management.metrics.web.server.auto-time-requests=false设置为false,默认为true;