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

Function getMetricNameForBroker

metrics.go:26–30  ·  view source on GitHub ↗
(name string, broker *Broker)

Source from the content-addressed store, hash-verified

24}
25
26func getMetricNameForBroker(name string, broker *Broker) string {
27 // Use broker id like the Java client as it does not contain '.' or ':' characters that
28 // can be interpreted as special character by monitoring tool (e.g. Graphite)
29 return name + "-for-broker-" + strconv.FormatInt(int64(broker.ID()), 10)
30}
31
32func getMetricNameForTopic(name string, topic string) string {
33 // Convert dot to _ since reporters like Graphite typically use dot to represent hierarchy

Callers 6

registerForBrokerMethod · 0.85
registerMeterMethod · 0.85
registerHistogramMethod · 0.85
registerCounterMethod · 0.85

Calls 1

IDMethod · 0.80

Tested by 3

registerForBrokerMethod · 0.68