quarkus reactive-postgresql-client with jaeger opentracing support
Asked Answered
L

1

0

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>
Legpull answered 27/11, 2019 at 18:22 Comment(0)
L
0

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.

Legpull answered 27/11, 2019 at 18:38 Comment(1)
By default only JAX-RS Resource methods have @Traced implied, every other method needs to explicitly include it. At least for nowUnconventional

© 2022 - 2025 — McMap. All rights reserved.