mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-29 19:54:55 +01:00
Fix metrics tag format so handler tags are properly exported to datadog
This commit is contained in:
parent
3baef9aeff
commit
f64362fbba
@ -74,8 +74,8 @@ func withLogging(s *statsd.Client) Middleware {
|
|||||||
duration := time.Since(start)
|
duration := time.Since(start)
|
||||||
fmt.Printf("%s %s %#v %s %s %s\n", getRemoteAddr(r), r.Method, r.RequestURI, getHishtoryVersion(r), duration.String(), byteCountToString(responseData.size))
|
fmt.Printf("%s %s %#v %s %s %s\n", getRemoteAddr(r), r.Method, r.RequestURI, getHishtoryVersion(r), duration.String(), byteCountToString(responseData.size))
|
||||||
if s != nil {
|
if s != nil {
|
||||||
s.Distribution("hishtory.request_duration", float64(duration.Microseconds())/1_000, []string{"HANDLER=" + getFunctionName(h)}, 1.0)
|
s.Distribution("hishtory.request_duration", float64(duration.Microseconds())/1_000, []string{"handler:" + getFunctionName(h)}, 1.0)
|
||||||
s.Incr("hishtory.request", []string{}, 1.0)
|
s.Incr("hishtory.request", []string{"handler:" + getFunctionName(h)}, 1.0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user