server: add prometheus metrics for CRI operations

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2017-11-09 11:10:35 +01:00
parent 9d3c442b7b
commit b959f8996d
No known key found for this signature in database
GPG key ID: B2BEAD150DE936B9
29 changed files with 324 additions and 54 deletions

View file

@ -92,6 +92,12 @@ var (
// RunPodSandbox creates and runs a pod-level sandbox.
func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest) (resp *pb.RunPodSandboxResponse, err error) {
const operation = "run_pod_sandbox"
defer func() {
recordOperation(operation, time.Now())
recordError(operation, err)
}()
s.updateLock.RLock()
defer s.updateLock.RUnlock()