简体   繁体   中英

Integrating Spring cloud sleuth with Spring project

I am trying to integrate spring cloud sleuth with an existing spring application which uses jetty server.

I have added

<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> 

and

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

How should I pass the logger properties, logging pattern while starting the app? Right now, it does not read the properties file under /resources folder and no traceId or spanId is generated.

Most of the examples have used Spring Boot. Need help to figure out how to integrate this with a Spring application with jetty server.

Spring Cloud Sleuth is Spring Boot based. Please use https://github.com/openzipkin/brave for non Spring Boot based applications.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM