gpt4 book ai didi

java - 使用 Jetty 服务器将 spring cloud sleuth 添加到 Spring 应用程序

转载 作者:行者123 更新时间:2023-12-02 11:59:58 26 4
gpt4 key购买 nike

我正在尝试将 spring cloud sleuth 与使用 jetty 服务器的现有 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>
</dependencies>

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

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

最佳答案

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

关于java - 使用 Jetty 服务器将 spring cloud sleuth 添加到 Spring 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47346883/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com