首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >似乎无法将spring-cloud-sleuth集成到spring boot应用程序中

似乎无法将spring-cloud-sleuth集成到spring boot应用程序中
EN

Stack Overflow用户
提问于 2021-06-24 23:06:12
回答 1查看 128关注 0票数 0

如果有人能提供关于如何调试它的想法,我将不胜感激……

我正在尝试将spring cloud sleuth与zipkin集成到我们的一个微服务中。我在pom.xml和带debug的属性中有以下内容。日志中没有来自spring-cloud-sleuth或spring-cloud-sleuth zipkin的常见消息。几乎就像spring-cloud-sleuth尚未加载或启动一样。但是,我收到以下调试消息:

2021-06-24 13:38:39调试o.s.w.s.h.BeanNameUrlHandlerMapping拒绝的bean名称zipkinEndpointLocator未标识o.s.w.s.h.BeanNameUrlHandlerMapping路径2021-06-24 13:38:39调试o.s.w.s.h.BeanNameUrlHandlerMapping拒绝的bean名称zipkinEndpointLocator:未标识的o.s.w.s.h.BeanNameUrlHandlerMapping路径2021-06-24 13:38:39调试zipkinEndpointLocator路径标识2021-06-24 13:38:39调试o.s.w.s.h.BeanNameUrlHandlerMapping -拒绝的bean名称‘paths 'org.springframework.cloud.sleuth.zipkin2.sender.ZipkinRestTemplateSenderConfiguration$DiscoveryClientZipkinUrlExtractorConfiguration$ZipkinClientLoadBalancedConfiguration':.defaultTraceSampler’:未标识的o.s.w.s.h.BeanNameUrlHandlerMapping路径2021-06-24 13:38:39调试o.s.w.s.h.BeanNameUrlHandlerMapping -拒绝的bean名称'defaultTraceSampler':未标识的o.s.w.s.h.BeanNameUrlHandlerMapping路径2021-06-24 13:38:39调试o.s.w.s.h.BeanNameUrlHandlerMapping-拒绝的bean名称URL未标识的路径2021-06-24 13:38:39调试o.s.w.s.h.BeanNameUrlHandlerMapping -拒绝的bean名称'loadBalancerClientZipkinLoadBalancer':没有确定的o.s.w.s.h.BeanNameUrlHandlerMapping路径2021-06-24 13:38:39调试o.s.w.s.h.BeanNameUrlHandlerMapping -拒绝的bean名称'org.springframework.cloud.sleuth.zipkin2.sender.ZipkinRestTemplateSenderConfiguration':没有确定的URL路径2021-06-24 13:38:39调试o.s.w.s.h.BeanNameUrlHandlerMapping-拒绝的bean名称loadBalancerClientZipkinLoadBalancer未标识URL路径2021-06-24 13:38:39调试o.s.w.s.h.BeanNameUrlHandlerMapping -拒绝的bean名称'spring.zipkin.sender-org.springframework.cloud.sleuth.zipkin2.sender.ZipkinSenderProperties'::未标识的URL路径2021-06-24 13:38:39调试o.s.w.s.h.BeanNameUrlHandlerMapping -拒绝的bean名称zipkinUrlExtractor:未标识的URL路径2021-06-24 13:38:39调试o.s.w.s.h.BeanNameUrlHandlerMapping -拒绝的bean名称zipkinUrlExtractor没有确定的URL路径2021-06-24 13:38:39调试o.s.w.s.h.BeanNameUrlHandlerMapping -拒绝的bean名称'org.springframework.cloud.sleuth.zipkin2.ZipkinAutoConfiguration'::没有确定的URL路径2021-06-24 13:38:39没有确定的URL路径2021-06-24 13:38:39没有确定的o.s.w.s.h.BeanNameUrlHandlerMapping路径2021-06- 06-24 13:38:39调试o.s.w.s.h.BeanNameUrlHandlerMapping -拒绝的bean名称'spring.sleuth.sampler-org.springframework.cloud.sleuth.sampler.SamplerProperties':未标识o.s.w.s.h.BeanNameUrlHandlerMapping路径2021-06-24 13:38:39调试o.s.w.s.h.BeanNameUrlHandlerMapping -拒绝的bean名称‘spring.sleuth.sampler-org.springframework.cloud.sleuth.sampler.SamplerProperties’:未标识的o.s.w.s.h.BeanNameUrlHandlerMapping路径2021-06-24 13:38:39调试o.s.w.s.h.BeanNameUrlHandlerMapping-拒绝的bean名称'org.springframework.cloud.sleuth.log.SleuthLogAutoConfiguration$Slf4jConfiguration':未标识URL路径2021-06-24 13:38:39调试pom - Rejected bean名称'org.springframework.cloud.sleuth.log.SleuthLogAutoConfiguration':未标识URL路径2021-06-24 13:38:39 DEBUG pom- Rejected bean名称'org.springframework.cloud.sleuth.autoconfig.TraceAutoConfiguration':未标识URL路径以下是我的o.s.w.s.h.BeanNameUrlHandlerMapping和属性文件中的内容

代码语言:javascript
复制
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.7.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
    <java.version>1.8</java.version>
    <spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <sonar.junit.reportsPath>target/surefire-reports</sonar.junit.reportsPath>
    <sonar.clover.reportPath>target/site/clover/clover.xml</sonar.clover.reportPath>
</properties>

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-zipkin</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-sleuth-zipkin</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-sleuth</artifactId>
    </dependency>  


spring.application.name=xxxx
spring.sleuth.sampler.percentage=100.0
spring.sleuth.enabled=true
spring.zipkin.baseUrl=http://dev.zipkin.cloud.xxxxxx.com:9411/      
spring.zipkin.sender.type=web
endpoints.enabled=true

logging.level.org.springframework.cloud.sleuth=DEBUG
EN

回答 1

Stack Overflow用户

发布于 2021-06-24 23:44:44

您使用的是Spring Boot和Spring Cloud的古老版本。请升级到最新版本。您可以转到start.spring.io并生成一个使用Boot and Sleuth的项目。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68118303

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档