MM-25005: Remove HttpRequestsDuration bucket (#14520)
* MM-25005: Remove HttpRequestsDuration bucket The ApiTimesHistograms already captures what HttpRequestsDuration does. And it's more granular than that. So there's no need to duplicate stuff. Let's remove this one. * Updating resource class to xlarge Co-authored-by: mattermod <mattermod@users.noreply.github.com> Co-authored-by: Jason Deland <jaydeland@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5686268a5a
Коммит
624980ff54
@@ -7,11 +7,11 @@ orbs:
|
|||||||
executors:
|
executors:
|
||||||
ubuntu:
|
ubuntu:
|
||||||
working_directory: ~/mattermost/
|
working_directory: ~/mattermost/
|
||||||
|
resource_class: xlarge
|
||||||
machine:
|
machine:
|
||||||
image: "ubuntu-1604:201903-01"
|
image: "ubuntu-1604:201903-01"
|
||||||
environment:
|
environment:
|
||||||
COMPOSE_PROJECT_NAME: "circleci"
|
COMPOSE_PROJECT_NAME: "circleci"
|
||||||
resource_class: "xlarge"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
setup:
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ type MetricsInterface interface {
|
|||||||
|
|
||||||
IncrementHttpRequest()
|
IncrementHttpRequest()
|
||||||
IncrementHttpError()
|
IncrementHttpError()
|
||||||
ObserveHttpRequestDuration(elapsed float64)
|
|
||||||
|
|
||||||
IncrementClusterRequest()
|
IncrementClusterRequest()
|
||||||
ObserveClusterRequestDuration(elapsed float64)
|
ObserveClusterRequestDuration(elapsed float64)
|
||||||
|
|||||||
@@ -181,11 +181,6 @@ func (_m *MetricsInterface) ObserveClusterRequestDuration(elapsed float64) {
|
|||||||
_m.Called(elapsed)
|
_m.Called(elapsed)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ObserveHttpRequestDuration provides a mock function with given fields: elapsed
|
|
||||||
func (_m *MetricsInterface) ObserveHttpRequestDuration(elapsed float64) {
|
|
||||||
_m.Called(elapsed)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ObservePluginApiDuration provides a mock function with given fields: pluginID, apiName, success, elapsed
|
// ObservePluginApiDuration provides a mock function with given fields: pluginID, apiName, success, elapsed
|
||||||
func (_m *MetricsInterface) ObservePluginApiDuration(pluginID string, apiName string, success bool, elapsed float64) {
|
func (_m *MetricsInterface) ObservePluginApiDuration(pluginID string, apiName string, success bool, elapsed float64) {
|
||||||
_m.Called(pluginID, apiName, success, elapsed)
|
_m.Called(pluginID, apiName, success, elapsed)
|
||||||
|
|||||||
@@ -260,7 +260,6 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
if r.URL.Path != model.API_URL_SUFFIX+"/websocket" {
|
if r.URL.Path != model.API_URL_SUFFIX+"/websocket" {
|
||||||
elapsed := float64(time.Since(now)) / float64(time.Second)
|
elapsed := float64(time.Since(now)) / float64(time.Second)
|
||||||
statusCode := strconv.Itoa(w.(*responseWriterWrapper).StatusCode())
|
statusCode := strconv.Itoa(w.(*responseWriterWrapper).StatusCode())
|
||||||
c.App.Metrics().ObserveHttpRequestDuration(elapsed)
|
|
||||||
c.App.Metrics().ObserveApiEndpointDuration(h.HandlerName, r.Method, statusCode, elapsed)
|
c.App.Metrics().ObserveApiEndpointDuration(h.HandlerName, r.Method, statusCode, elapsed)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user