confluentinc / confluent-kafka-go

Confluent's Apache Kafka Golang client
Apache License 2.0
4.61k stars 657 forks source link

Are there any plans to support an open telemetry hook to the library? #712

Open naveenchlsn opened 2 years ago

naveenchlsn commented 2 years ago

We need to write custom wrappers over producer and consumer to support open telemetry instrumentation. Libraries like go-redis support open telemetry hooks and clients can onboard instrumentation with a single line by configuring the hook. Are there plans to implement a similar hook for confluent? I would be happy to contribute if required.

jliunyu commented 2 years ago

Can you please provide more details about what is expected to be reported?

kurennoy16 commented 1 year ago

Hey there Any news from the year-ago + perspective?

There is an example for inspiration from DataDog -> https://github.com/DataDog/dd-trace-go/blob/main/contrib/confluentinc/confluent-kafka-go/kafka/kafka.go

That would be great if a commercially supported library, like this one, provides the ability to integrate with OpenTelemetry out of the box.

limoges commented 1 month ago

I'd like to request support for that features as well.

As of today, Semantic Convention 1.27.0 suggests the following metrics be implemented, think of Kafka as a "messaging client": https://opentelemetry.io/docs/specs/semconv/messaging/kafka/

jurabek commented 1 month ago

Hi guys, please give a try https://pkg.go.dev/github.com/jurabek/otelkafka it also can be found on otel-registry and feel free to open an issue, if you have any suggestions.