add service type label
This commit is contained in:
1 parent
654d605271
commit
929d90baa3
1 file changed
+2
-2
@@ -38,7 +38,7 @@ var (
|
||||
Name: "service_latency_seconds",
|
||||
Help: "Latency of services.",
|
||||
},
|
||||
[]string{"service"},
|
||||
[]string{"service", "type"},
|
||||
)
|
||||
addr = flag.String("a", "0.0.0.0", "address to use")
|
||||
port = flag.String("p", "9062", "port to run on")
|
||||
@@ -154,7 +154,7 @@ func checkLatency() {
|
||||
duration = time.Since(start)
|
||||
}
|
||||
|
||||
latency.With(prometheus.Labels{"service": service.Name}).Set(duration.Seconds())
|
||||
latency.With(prometheus.Labels{"service": service.Name, "type": service.Type}).Set(duration.Seconds())
|
||||
if *debug == true {
|
||||
log.Printf("DEBUG: Latency %s: %v seconds", service.Name, duration.Seconds())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user