Skip to content

Commit

Permalink
Update metric name to total
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidNix committed May 12, 2023
1 parent 09c1593 commit 16755cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion metrics/reference_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func NewHTTPRequest() *ReferenceAPI {
return &ReferenceAPI{
errorCounter: prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: prometheus.BuildFQName(namespace, refAPISubsystem, "error_count"),
Name: prometheus.BuildFQName(namespace, refAPISubsystem, "error_total"),
Help: "Number of errors encountered while making external calls to an API to gather reference data.",
},
[]string{"host", "reason"},
Expand Down
2 changes: 1 addition & 1 deletion metrics/reference_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ func TestReferenceAPI_IncAPIError(t *testing.T) {
r := httptest.NewRecorder()
h.ServeHTTP(r, stubRequest)

require.Contains(t, r.Body.String(), `sl_exporter_reference_api_error_count{host="test.example",reason="timeout"} 1`)
require.Contains(t, r.Body.String(), `sl_exporter_reference_api_error_total{host="test.example",reason="timeout"} 1`)
}

0 comments on commit 16755cf

Please sign in to comment.