Extract metrics to own package and refactor implementations
This commit is contained in:
parent
c1b5b740ff
commit
e6c2040ea8
19 changed files with 599 additions and 797 deletions
|
@ -23,7 +23,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
metrics = thoas_stats.New()
|
||||
stats = thoas_stats.New()
|
||||
statsRecorder *middlewares.StatsRecorder
|
||||
)
|
||||
|
||||
|
@ -174,7 +174,7 @@ type healthResponse struct {
|
|||
}
|
||||
|
||||
func (provider *WebProvider) getHealthHandler(response http.ResponseWriter, request *http.Request) {
|
||||
health := &healthResponse{Data: metrics.Data()}
|
||||
health := &healthResponse{Data: stats.Data()}
|
||||
if statsRecorder != nil {
|
||||
health.Stats = statsRecorder.Data()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue