Documentation ¶
Index ¶
Constants ¶
View Source
const ( // LabelTopic is the label for the immutable name of the topic. LabelTopic = "topic" // Sarama Metrics RecordSendRateForTopicPrefix = "record-send-rate-for-topic-" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
Define StatsReporter Structure
func (*Reporter) Report ¶
Report The Sarama Metrics (go-metrics) Via Knative / OpenCensus Metrics
NOTE - Sarama provides lots of metrics which would be good to expose, but for now
we're just quickly parsing out message counts. This is for rough parity with the prior Confluent implementation and due to uncertainty around integrating with Knative Observability and potentially Sarama v2 using OpenTelemetry directly as described here... https://github.com/Shopify/sarama/issues/1340 If we do decide to expose all available metrics, the following library might be useful... https://github.com/deathowl/go-metrics-prometheus Further the Sarama Consumer metrics don't track messages so we might need/want to manually track produced/consumed messages at the Topic/Partition/ConsumerGroup level.
type StatsReporter ¶
StatsReporter defines the interface for sending ingress metrics.
func NewStatsReporter ¶
func NewStatsReporter(log *zap.Logger) StatsReporter
StatsReporter Constructor
Click to show internal directories.
Click to hide internal directories.