Conversation
internal/publisher/publisher.go
Outdated
| if p.config.maxBufferedRecords > 0 { | ||
| p.metricEmitter.Notify(metrics.Event{ | ||
| Name: metrics.KafkaBufferUtilization, | ||
| Value: 0, // Initial value |
There was a problem hiding this comment.
this metric currently doesn't do anything and will always return 0. The way it's set up in talaria is the gauge function will be called for every prometheus scrape. metrics.go sets up a default GaugeFunction that does basically nothing by default other than a nil check to see if the real gaugeFunction has been set.
https://github.com/xmidt-org/talaria/blob/main/metrics.go#L392
Then publisher.go conditionally sets up the actual gauge function on Start:
https://github.com/xmidt-org/talaria/blob/main/publisher.go#L274
The reason the gaugeFunc can't be set until later is because it needs the publisher to be created for the BufferedRecords call.
piccione99
left a comment
There was a problem hiding this comment.
see inline - publisher.go, line 143
Closes #26