quarkus reactive-postgresql-client with jaeger opentracing support

穿精又带淫゛_ 提交于 2020-01-25 08:50:29

问题


Based on this and this

How would I enable tracing for reactive-sql-clients ?

Now use %dev.quarkus.datasource.url=vertx-reactive:postgresql://dev-db-server:5432/mydb - it works, but no tracing support though. I can see racing for my rest calls but not the db.

Tried to use %dev.quarkus.datasource.url=vertx-reactive:tracing:postgresql://dev-db-server:5432/mydb

my deps:

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


I see..

I thought @Traced will be somehow propagated to my db-services/repositories. No, I have to put it explicitly:

import org.eclipse.microprofile.opentracing.Traced;

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

    @Inject
    PgPool client;

That fixes the issue.



来源:https://stackoverflow.com/questions/59076369/quarkus-reactive-postgresql-client-with-jaeger-opentracing-support

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!