sarama icon indicating copy to clipboard operation
sarama copied to clipboard

Include software version in requests in order to collect metrics for the client on brokers

Open omersiar opened this issue 1 year ago • 7 comments

Hi,

Brokers can track of client versions and their metrics can be collected from JMX. We discovered almost every library set their software version but not the sarama.

https://docs.confluent.io/platform/current/kafka/monitoring.html#clientsoftwarename-clientsoftwareversion

omersiar avatar Dec 22 '23 09:12 omersiar

Maybe related to issue below, since sarama incorporates version.go

https://github.com/golang/go/issues/50603

omersiar avatar Dec 25 '23 07:12 omersiar

If I understand correctly, if boolean returned true it may not reflect the dependent package

franz-go implemented like this: https://github.com/twmb/franz-go/blob/master/pkg/kgo/config.go#L418-L430

omersiar avatar Dec 25 '23 09:12 omersiar

@omersiar Sarama does send its software name and version to Kafka as long as you are using sarama.Version = V2_4_0_0 or newer in your config and haven't disabled it via https://github.com/IBM/sarama/blob/5f63a84f47c39bf08a1c276f1f6b5f1d754e9fc3/config.go#L485-L489C2

https://github.com/IBM/sarama/blob/5f63a84f47c39bf08a1c276f1f6b5f1d754e9fc3/broker.go#L176-L201

dnwe avatar Feb 11 '24 09:02 dnwe

It's suboptimal that this isn't sent by default though. Can we send API versions by default and ignore the error if the broker doesn't understand it?

ijuma avatar Mar 03 '24 22:03 ijuma

Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur. Please check if the main branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.

github-actions[bot] avatar Jun 02 '24 00:06 github-actions[bot]