(name string, topic string)
| 30 | } |
| 31 | |
| 32 | func getMetricNameForTopic(name string, topic string) string { |
| 33 | // Convert dot to _ since reporters like Graphite typically use dot to represent hierarchy |
| 34 | // cf. KAFKA-1902 and KAFKA-2337 |
| 35 | return name + "-for-topic-" + strings.ReplaceAll(topic, ".", "_") |
| 36 | } |
| 37 | |
| 38 | func getOrRegisterTopicMeter(name string, topic string, r metrics.Registry) metrics.Meter { |
| 39 | return metrics.GetOrRegisterMeter(getMetricNameForTopic(name, topic), r) |
no outgoing calls