Spring boot 如何防止sleuth/zipkin跟踪目录服务监视?

Spring boot 如何防止sleuth/zipkin跟踪目录服务监视?,spring-boot,zipkin,spring-cloud-sleuth,spring-cloud-consul,Spring Boot,Zipkin,Spring Cloud Sleuth,Spring Cloud Consul,我已经在我的应用程序上启用了zipkin,它运行良好,我看到了痕迹。我的应用程序正在使用Concur服务发现,我看到Zipkin中跟踪了很多流量 跟踪的名称类似于“catalog-services\u watch”,包含以下内容: { "key": "class", "value": "ConsulCatalogWatch", "endpoint": { "serviceName": "myService", "ipv4": "10.0.36.114", "p

我已经在我的应用程序上启用了zipkin,它运行良好,我看到了痕迹。我的应用程序正在使用Concur服务发现,我看到Zipkin中跟踪了很多流量

跟踪的名称类似于“catalog-services\u watch”,包含以下内容:

{
  "key": "class",
  "value": "ConsulCatalogWatch",
  "endpoint": {
    "serviceName": "myService",
    "ipv4": "10.0.36.114",
    "port": 8443
  }
},
{
  "key": "lc",
  "value": "scheduled",
  "endpoint": {
    "serviceName": "myService",
    "ipv4": "10.0.36.114",
    "port": 8443
  }
},
{
  "key": "method",
  "value": "catalogServicesWatch",
  "endpoint": {
    "serviceName": "myService",
    "ipv4": "10.0.36.114",
    "port": 8443
  }
}

如何禁用这些跟踪?我尝试了spring.sleuth.instrument.web.skipPattern参数,但它不起作用

我发现这些痕迹实际上是由

因为这是一个用@scheduled注释的类,所以这个Sleuth特性适用于:


因此,控制跳过的regexp的属性不是spring.sleuth.instrument.web.skipPattern,而是spring.sleuth.instrument.scheduled.skip pattern

Hi!我现在也有同样的问题。你到底是怎么修好的?你在skip pattern属性中使用了哪种模式?@VandersonAssis如果你把答案读到最后,它表明他在答案的结尾放了要使用的属性,而不是模式。你知道如何区分两者吗?嗯,模式很简单。*看