diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-02-10 07:04:14 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-02-10 07:04:14 -0800 |
commit | 58dcf6984be18d73968b3b96655ce57169a6c169 (patch) | |
tree | 9e1c440c905271645bcfadbec57da2ba0aff5095 | |
parent | 9934954d18b51c0042b9045201453e1fe64d48ed (diff) | |
download | chat-58dcf6984be18d73968b3b96655ce57169a6c169.tar.gz chat-58dcf6984be18d73968b3b96655ce57169a6c169.tar.bz2 chat-58dcf6984be18d73968b3b96655ce57169a6c169.zip |
Add cluster request time logging for master (#5347)
-rw-r--r-- | config/config.json | 4 | ||||
-rw-r--r-- | einterfaces/metrics.go | 3 | ||||
-rw-r--r-- | model/config.go | 6 |
3 files changed, 12 insertions, 1 deletions
diff --git a/config/config.json b/config/config.json index 330db637d..39414bdb9 100644 --- a/config/config.json +++ b/config/config.json @@ -40,7 +40,9 @@ "AllowEditPost": "always", "PostEditTimeLimit": 300, "TimeBetweenUserTypingUpdatesMilliseconds": 5000, - "EnableUserTypingMessages": true + "EnableUserTypingMessages": true, + "EnableUserTypingMessages": true, + "ClusterLogTimeoutMilliseconds": 2000 }, "TeamSettings": { "SiteName": "Mattermost", diff --git a/einterfaces/metrics.go b/einterfaces/metrics.go index 394abf94d..3c0202d38 100644 --- a/einterfaces/metrics.go +++ b/einterfaces/metrics.go @@ -17,6 +17,9 @@ type MetricsInterface interface { IncrementHttpError() ObserveHttpRequestDuration(elapsed float64) + IncrementClusterRequest() + ObserveClusterRequestDuration(elapsed float64) + IncrementLogin() IncrementLoginFail() diff --git a/model/config.go b/model/config.go index a134717ba..2401f0291 100644 --- a/model/config.go +++ b/model/config.go @@ -105,6 +105,7 @@ type ServiceSettings struct { PostEditTimeLimit *int TimeBetweenUserTypingUpdatesMilliseconds *int64 EnableUserTypingMessages *bool + ClusterLogTimeoutMilliseconds *int } type ClusterSettings struct { @@ -1084,6 +1085,11 @@ func (o *Config) SetDefaults() { *o.ServiceSettings.EnableUserTypingMessages = true } + if o.ServiceSettings.ClusterLogTimeoutMilliseconds == nil { + o.ServiceSettings.ClusterLogTimeoutMilliseconds = new(int) + *o.ServiceSettings.ClusterLogTimeoutMilliseconds = 2000 + } + o.defaultWebrtcSettings() } |