DataDog / dd-trace-go

Datadog Go Library including APM tracing, profiling, and security monitoring.
https://docs.datadoghq.com/tracing/
Other
652 stars 436 forks source link

Support tracing Sarama's ConsumerGroupHandler #2133

Open doron-cohen opened 1 year ago

doron-cohen commented 1 year ago

Hi,

Currently under the sarama instrumentation for consuming from Kafka only sarama.Consumer and sarama.PartitionConsumer are supported. There is also sarama.ConsumerGroupHandler which is important for instrumenting consumer group consumers.

Since we are using Watermill as a wrapper to our Kafka consuming we don't get traces for kafka.consume since it wraps the consumer group handler when a consumer group is used.

There is a reference implementation in the OTEL Go repo which I use locally and I could contribute to this repo.

Olli73773 commented 1 year ago

Hi,

I would also need instrumentation for sarama.ConsumerGroupHandler and there was at least some work done in https://github.com/DataDog/dd-trace-go/pull/1394 pull request.

KyleWiering commented 7 months ago

Otelsarama example was removed, this looks like the last version with it present.

https://github.com/open-telemetry/opentelemetry-go-contrib/tree/zpages/v0.43.0/instrumentation/github.com/Shopify/sarama/otelsarama