具有jaeger opentracing支持的quarkus react-postgresql-client [英] quarkus reactive-postgresql-client with jaeger opentracing support
本文介绍了具有jaeger opentracing支持的quarkus react-postgresql-client的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何为 reactive-sql-clients 启用跟踪?
现在使用%dev.quarkus.datasource.url=vertx-reactive:postgresql://dev-db-server:5432/mydb
-它可以工作,但是没有跟踪支持.我可以看到我正在为我的休息电话而比赛,但是没有数据库.
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.
试图使用%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>
推荐答案
我知道了.
我认为 @Traced 将以某种方式传播到我的数据库服务/存储库.不,我必须明确地说:
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;
可以解决此问题.
这篇关于具有jaeger opentracing支持的quarkus react-postgresql-client的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文