github.com/vnforks/kid/v5@v5.22.1-0.20200408055009-b89d99c65676/einterfaces/metrics.go (about) 1 // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. 2 // See LICENSE.txt for license information. 3 4 package einterfaces 5 6 type MetricsInterface interface { 7 StartServer() 8 StopServer() 9 10 IncrementNotificationMessageSentPush() 11 12 IncrementPostCreate() 13 IncrementWebhookPost() 14 IncrementPostSentEmail() 15 IncrementPostSentPush() 16 IncrementPostBroadcast() 17 IncrementPostFileAttachment(count int) 18 19 IncrementHttpRequest() 20 IncrementHttpError() 21 ObserveHttpRequestDuration(elapsed float64) 22 23 IncrementClusterRequest() 24 ObserveClusterRequestDuration(elapsed float64) 25 IncrementClusterEventType(eventType string) 26 27 IncrementLogin() 28 IncrementLoginFail() 29 30 IncrementEtagHitCounter(route string) 31 IncrementEtagMissCounter(route string) 32 33 IncrementMemCacheHitCounter(cacheName string) 34 IncrementMemCacheMissCounter(cacheName string) 35 IncrementMemCacheInvalidationCounter(cacheName string) 36 IncrementMemCacheMissCounterSession() 37 IncrementMemCacheHitCounterSession() 38 IncrementMemCacheInvalidationCounterSession() 39 40 IncrementWebsocketEvent(eventType string) 41 IncrementWebSocketBroadcast(eventType string) 42 IncrementWebSocketBroadcastBufferSize(hub string, amount float64) 43 DecrementWebSocketBroadcastBufferSize(hub string, amount float64) 44 IncrementWebSocketBroadcastUsersRegistered(hub string, amount float64) 45 DecrementWebSocketBroadcastUsersRegistered(hub string, amount float64) 46 47 AddMemCacheHitCounter(cacheName string, amount float64) 48 AddMemCacheMissCounter(cacheName string, amount float64) 49 50 IncrementPostsSearchCounter() 51 ObservePostsSearchDuration(elapsed float64) 52 ObserveStoreMethodDuration(method, success string, elapsed float64) 53 ObserveApiEndpointDuration(endpoint, method string, elapsed float64) 54 IncrementPostIndexCounter() 55 IncrementUserIndexCounter() 56 IncrementClassIndexCounter() 57 58 ObservePluginHookDuration(pluginID, hookName string, success bool, elapsed float64) 59 ObservePluginMultiHookIterationDuration(pluginID string, elapsed float64) 60 ObservePluginMultiHookDuration(elapsed float64) 61 ObservePluginApiDuration(pluginID, apiName string, success bool, elapsed float64) 62 }