问题
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