confluent-kafka-javascript icon indicating copy to clipboard operation
confluent-kafka-javascript copied to clipboard

Using @opentelemetry/instrumentation-kafkajs

Open Omers-Frontegg opened this issue 7 months ago • 2 comments

Hi there, im trying to use otel's kafka exporter, however it's dependent on kafkajs. Is there a way to use it though?

Thanks!

Omers-Frontegg avatar May 16 '25 12:05 Omers-Frontegg

I am also curious if @opentelemetry/instrumentation-kafkajs can be used to auto instrument confluent-kafka-javascript

tabomors avatar Jun 11 '25 11:06 tabomors

Hello ! I was also looking for this but could not find it so I started to write a new instrumentation for confluent-kafka-javascript https://github.com/Drazke/instrumentation-confluent-kafka-javascript, it is based on an rdkafka instrumentation that I found, so you will not have exactly the same Span as kafkajs instrumentation (the events are not the same) but it work for the general case (produce and consume).

It is still in progress but fell free to try and add some recommandation.

Drazke avatar Jun 30 '25 18:06 Drazke