Skip to content

Commit

Permalink
fixed webservice metric label
Browse files Browse the repository at this point in the history
  • Loading branch information
pedy4000 committed Apr 8, 2024
1 parent 2d7be3a commit a7e276f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/auth/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ func (a *authV2) Check(ctx context.Context, check *CheckRequestV2) (*CheckRespon
labels = AddUpstreamAuthLabel(labels, request.Context[HasUpstreamAuth])
labels[CheckRequestVersionLabel] = MetricsCheckRequestVersion2
reqLatency.With(labels).Observe(time.Since(reqStartTime).Seconds())
labels = AddWebserviceLabel(labels, string(CerberusHeaderWebservice))
labels = AddWebserviceLabel(labels, response.Response.Header.Get(string(CerberusHeaderWebservice)))
reqCount.With(labels).Inc()


return final_response, nil
}

Expand All @@ -77,7 +76,7 @@ func (a *authV3) Check(ctx context.Context, check *CheckRequestV3) (*CheckRespon
labels = AddUpstreamAuthLabel(labels, request.Context[HasUpstreamAuth])
labels[CheckRequestVersionLabel] = MetricsCheckRequestVersion3
reqLatency.With(labels).Observe(time.Since(reqStartTime).Seconds())
labels = AddWebserviceLabel(labels, string(CerberusHeaderWebservice))
labels = AddWebserviceLabel(labels, response.Response.Header.Get(string(CerberusHeaderWebservice)))
reqCount.With(labels).Inc()

return final_response, nil
Expand Down

0 comments on commit a7e276f

Please sign in to comment.