0

我正在尝试将 spring cloud sleuth 与使用码头服务器的现有 spring 应用程序集成。

我已经添加了

<dependencyManagement>
   <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-sleuth</artifactId>
            <version>1.2.4.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement> 

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

我应该如何在启动应用程序时传递记录器属性、记录模式?现在,它不会读取 /resources 文件夹下的属性文件,也不会生成 traceId 或 spanId。

大多数示例都使用了 Spring Boot。需要帮助来弄清楚如何将它与带有码头服务器的 Spring 应用程序集成。

4

1 回答 1

2

Spring Cloud Sleuth 基于 Spring Boot。对于非基于 Spring Boot 的应用程序,请使用https://github.com/openzipkin/brave 。

于 2017-11-17T09:31:03.760 回答