Add OpenTelemetry support to PubSub configuration#2946
Add OpenTelemetry support to PubSub configuration#2946raphasil wants to merge 6 commits intosmallrye:mainfrom
Conversation
a751254 to
c2cd791
Compare
|
@raphasil I pushed a rebase, a small fix and a test for enabling OTel on the pubsub client. However, this does not enable tracing propagation for messaging, like in Quarkus. We can do that in a future PR. |
| private final List<ManagedChannel> channels = new CopyOnWriteArrayList<>(); | ||
|
|
||
| @Inject | ||
| private Instance<OpenTelemetry> openTelemetryInstance; |
There was a problem hiding this comment.
Doesn't this require OpenTelemetry to be on the classpath?
There was a problem hiding this comment.
opentelemetry-api yes. We do have the smallrye-reactive-messaging-otel module to pull those dependencies. But gcp pubsub depends on the OTel API too.
There was a problem hiding this comment.
@cescoffier The OpenTelemetry library is already included in the classpath through both the google-cloud-pubsub library, which relies on OpenTelemetry for gRPC instrumentation, and the smallrye-reactive-messaging-otel library. The tracing functionality is only activated when the configuration otel-enabled=true is set and when the OpenTelemetry instance is accessible via CDI. Please let me know if I misunderstood anything.
|
@ozangunalp I implemented tracing propagation at the messaging level to link producer and consumer spans across the messaging system. I used the Kafka and AMQP modules as references. I also fixed the tests |
closes #2941