MCPcopy
hub / github.com/IBM/sarama / getMetricNameForTopic

Function getMetricNameForTopic

metrics.go:32–36  ·  view source on GitHub ↗
(name string, topic string)

Source from the content-addressed store, hash-verified

30}
31
32func 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
38func getOrRegisterTopicMeter(name string, topic string, r metrics.Registry) metrics.Meter {
39 return metrics.GetOrRegisterMeter(getMetricNameForTopic(name, topic), r)

Callers 4

getOrRegisterTopicMeterFunction · 0.85

Calls

no outgoing calls

Tested by 2