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>
Этот коммит содержится в:
Michael Kochell
2023-10-13 14:59:12 -04:00
коммит произвёл GitHub
родитель 72c75f01ce
Коммит e9da1ee8ca
8 изменённых файлов: 49 добавлений и 8 удалений

Просмотреть файл

@@ -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()