-
-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider rewriting latency metrics #72
Comments
done in #97 , will be released with next Centrifugo version |
I am not very happy with how metrics currently implemented. This is current type NodeInfo struct {
mu sync.RWMutex
UID string `json:"uid"`
Name string `json:"name"`
Goroutines int `json:"num_goroutine"`
Clients int `json:"num_clients"`
Unique int `json:"num_unique_clients"`
Channels int `json:"num_channels"`
Started int64 `json:"started_at"`
Gomaxprocs int `json:"gomaxprocs"`
NumCPU int `json:"num_cpu"`
metrics
updated int64
} It's located in type NodeInfo struct {
mu sync.RWMutex
UID string `json:"uid"`
Name string `json:"name"`
Metrics map[string]int64 `json:"metrics"`
updated int64
} This will allow to abstract various counters and operate by semantic names in code rather than concrete struct fields (i.e. something like Histogram registry but for counters). Also I think it's a good idea to include latencies into that metrics map as flat keys without extra This is a breaking change unfortunately:( |
Current latencies implementation is like quantum measurement:) Asking for metrics affects latency metrics significantly. So per specific API command histograms could really make sense. But this is only possible to insert after net/http and request decoding work already done. Will try to investigate this more. |
done in v1.6.0 |
In Centrifugo 1.4.0 we deprecated timers. Here is an issue to consider making them right and put back in future releases.
This includes: client request time, API request time.
As @banks said in #68:
The text was updated successfully, but these errors were encountered: