From 412261e4134e5b91d642208096833bcde3fef4d2 Mon Sep 17 00:00:00 2001 From: Iain Macdonald Date: Mon, 21 Oct 2024 10:55:28 -0700 Subject: [PATCH] [Cache Proxy]: record human-readable gRPC response codes in atime-updater gRPC metric (#7759) This metrics currently has values like "0" and "5." This PR switches to using the human-readable gRPC code as the value, e.g. "OK" or "NOT_FOUND," similar to the other gRPC graphs. --- enterprise/server/atime_updater/atime_updater.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enterprise/server/atime_updater/atime_updater.go b/enterprise/server/atime_updater/atime_updater.go index c8fae796114..57e8248c26d 100644 --- a/enterprise/server/atime_updater/atime_updater.go +++ b/enterprise/server/atime_updater/atime_updater.go @@ -272,7 +272,7 @@ func (u *atimeUpdater) update(ctx context.Context, groupID string, jwt string, u metrics.RemoteAtimeUpdatesSent.With( prometheus.Labels{ metrics.GroupID: groupID, - metrics.StatusLabel: fmt.Sprintf("%d", gstatus.Code(err)), + metrics.StatusLabel: gstatus.Code(err).String(), }).Inc() if err != nil { log.CtxWarningf(ctx, "Error sending FindMissingBlobs request to update remote atimes for group %s: %s", groupID, err)