open-telemetry / opentelemetry-go-contrib

Collection of extensions for OpenTelemetry-Go.
https://opentelemetry.io/
Apache License 2.0
1.21k stars 564 forks source link

[sarama] add sarama client metrics #2966

Open leewoobin789 opened 2 years ago

leewoobin789 commented 2 years ago

sarama client is already gathering both of its producer & consumer metrics such as "consumer-batch-size", "compression-ratio" etc. I would love to have the metric feature addition to sarama for better application insight.

This will fulfill the subset of producer & consumer metrics defined in the specification

Producer

Consumer only lag & offset related metrics are defined in specification, which are gathered within Otel collector Contrib kafkareceiver.

MrAlias commented 2 years ago

Are there semantic conventions that outline the OTel metrics that should be exposed here?

If so, please update this issue with the planned additions an link to the appropriate semantic convention sections.

If not, please work with the specification repository to define appropriate metrics so all of OTel will have consistent coverage of this technology.

leewoobin789 commented 2 years ago

@MrAlias https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/instrumentation/kafka.md there is corresponding Kafka specification that is already defined. so the previous pr, which is closed, would be able to cover a subset of the specified metrics. I will rename the metrics so that the naming is conform to the specification and will reference it in the next PR. thank you!

leewoobin789 commented 2 years ago

the metrics need to be also broken down to topic level.

MrAlias commented 2 years ago

I will rename the metrics so that the naming is conform to the specification and will reference it in the next PR. thank you!

Feel free to re-open that PR (#2968) once you are able to describe the plan to add metric here. Unless you think it needs to be restarted.

For reference: https://github.com/open-telemetry/opentelemetry-go-contrib/issues/2840

leewoobin789 commented 2 years ago

@MrAlias I will probably reopen it when I am finished with rework and further improvement. thank you!