Performance metrics: Differentiate requests that are from page load (#24327)
* POC page_load_context header * refactor to make this.pageLoadContext a private field, and relocate setTimeout code * add pageLoadContext to `ObserveAPIEndpointDuration` method * move to telemetry_actions * move PageContext constant in webapp * give server control of possible page_load_context values * variable name change --------- Co-authored-by: mickmister <mickmister> Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
72c75f01ce
Коммит
e9da1ee8ca
@@ -58,7 +58,7 @@ type MetricsInterface interface {
|
||||
IncrementFilesSearchCounter()
|
||||
ObserveFilesSearchDuration(elapsed float64)
|
||||
ObserveStoreMethodDuration(method, success string, elapsed float64)
|
||||
ObserveAPIEndpointDuration(endpoint, method, statusCode, originClient string, elapsed float64)
|
||||
ObserveAPIEndpointDuration(endpoint, method, statusCode, originClient, pageLoadContext string, elapsed float64)
|
||||
IncrementPostIndexCounter()
|
||||
IncrementFileIndexCounter()
|
||||
IncrementUserIndexCounter()
|
||||
|
||||
@@ -239,9 +239,9 @@ func (_m *MetricsInterface) IncrementWebsocketReconnectEvent(eventType string) {
|
||||
_m.Called(eventType)
|
||||
}
|
||||
|
||||
// ObserveAPIEndpointDuration provides a mock function with given fields: endpoint, method, statusCode, originClient, elapsed
|
||||
func (_m *MetricsInterface) ObserveAPIEndpointDuration(endpoint string, method string, statusCode string, originClient string, elapsed float64) {
|
||||
_m.Called(endpoint, method, statusCode, originClient, elapsed)
|
||||
// ObserveAPIEndpointDuration provides a mock function with given fields: endpoint, method, statusCode, originClient, pageLoadContext, elapsed
|
||||
func (_m *MetricsInterface) ObserveAPIEndpointDuration(endpoint string, method string, statusCode string, originClient string, pageLoadContext string, elapsed float64) {
|
||||
_m.Called(endpoint, method, statusCode, originClient, pageLoadContext, elapsed)
|
||||
}
|
||||
|
||||
// ObserveClusterRequestDuration provides a mock function with given fields: elapsed
|
||||
|
||||
Ссылка в новой задаче
Block a user