Skip to content

Commit

Permalink
rename Counter => Count
Browse files Browse the repository at this point in the history
  • Loading branch information
ajatprabha committed Jul 1, 2019
1 parent 7336bac commit bfe7105
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/handler/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func ImageHandler(deps *service.Dependencies) http.HandlerFunc {
res := deps.Storage.Get(r.Context(), r.URL.Path)
if res.Error() != nil {
logger.Errorf("error: %s", res.Error())
metrics.Update(metrics.UpdateOption{Name: StorageGetErrorKey, Type: metrics.Counter})
metrics.Update(metrics.UpdateOption{Name: StorageGetErrorKey, Type: metrics.Count})
w.WriteHeader(res.Status())
return
}
Expand All @@ -41,7 +41,7 @@ func ImageHandler(deps *service.Dependencies) http.HandlerFunc {
data, err = deps.Manipulator.Process(r.Context(), data, params)
if err != nil {
logger.Errorf("error: %s", res.Error())
metrics.Update(metrics.UpdateOption{Name: ProcessorErrorKey, Type: metrics.Counter})
metrics.Update(metrics.UpdateOption{Name: ProcessorErrorKey, Type: metrics.Count})
w.WriteHeader(http.StatusUnprocessableEntity)
return
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type Type int
const (
Duration Type = 0
Gauge Type = 1
Counter Type = 2
Count Type = 2
)

type UpdateOption struct {
Expand Down

0 comments on commit bfe7105

Please sign in to comment.