recordOperation records operation and duration
(operation string, start time.Time)
| 444 | |
| 445 | // recordOperation records operation and duration |
| 446 | func recordOperation(operation string, start time.Time) { |
| 447 | metrics.NetworkPluginOperations.WithLabelValues(operation).Inc() |
| 448 | metrics.NetworkPluginOperationsLatency.WithLabelValues( |
| 449 | operation, |
| 450 | ).Observe( |
| 451 | metrics.SinceInSeconds(start), |
| 452 | ) |
| 453 | } |
| 454 | |
| 455 | // recordError records errors for metric. |
| 456 | func recordError(operation string) { |
searching dependent graphs…