具有jaeger opentracing支持的quarkus react-postgresql-client

时间:2019-11-27 18:22:10

标签: quarkus opentracing jaeger

基于thisthis

如何为reactive-sql-clients启用跟踪?

现在使用%dev.quarkus.datasource.url=vertx-reactive:postgresql://dev-db-server:5432/mydb-它可以工作,但是没有跟踪支持。我可以看到我正在为我的休息电话而比赛,但是没有数据库。

试图使用%dev.quarkus.datasource.url=vertx-reactive:tracing:postgresql://dev-db-server:5432/mydb

我的部门:

<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-smallrye-openapi</artifactId>
</dependency>

<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-agroal</artifactId>
</dependency>

<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-reactive-pg-client</artifactId>
</dependency>

1 个答案:

答案 0 :(得分:0)

我明白了。

我认为 @Traced 将以某种方式传播到我的数据库服务/存储库。不,我必须明确地说:

import org.eclipse.microprofile.opentracing.Traced;

@Traced        // << -- here it is
@Singleton
public class MarketPgRepository implements MarketRepository {

    @Inject
    PgPool client;

可以解决此问题。