management.tracing.sampling.probability 没有出现在我的微服务项目中。我正在使用千分尺和网络客户端。我该如何解决这个问题?

问题描述 投票:0回答:2

所以,我可以在我的发现服务器中使用属性management.tracing.sampling.probability。但在我的微服务类中,我无法看到或使用 yaml 文件中的属性。我已经尝试了所有可能的依赖。但我不明白我如何只能在我的发现服务器中使用和查看它。

micrometer spring-micrometer micrometer-tracing
2个回答
0
投票

我假设这是 Boot 3.x,如果是这样,你需要执行器和桥接器:

实现“org.springframework.boot:spring-boot-starter-actuator” 实现 'io.micrometer:micrometer-tracing-bridge-brave'


0
投票

我遇到了同样的问题,但我的 Spring Boot 版本是 2.7.8 有什么建议请

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.8</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>
    // dependencies are
    https://mvnrepository.com/artifact/net.sf.jasperreports/jasperreports -->
        <dependency>
            <groupId>net.sf.jasperreports</groupId>
            <artifactId>jasperreports</artifactId>
            <version>6.20.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <!--
        https://mvnrepository.com/artifact/io.micrometer/micrometer-observation -->
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-observation</artifactId>
            <version>1.12.5</version>
        </dependency>
        <!--
        https://mvnrepository.com/artifact/io.micrometer/micrometer-tracing-bridge-brave -->
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-tracing-bridge-brave</artifactId>
            <version>1.2.5</version>
        </dependency>
        <!--
        https://mvnrepository.com/artifact/io.zipkin.reporter2/zipkin-reporter-brave -->
        <dependency>
            <groupId>io.zipkin.reporter2</groupId>
            <artifactId>zipkin-reporter-brave</artifactId>
        </dependency>
© www.soinside.com 2019 - 2024. All rights reserved.