Expose public/ API as submodule (#23345)
* model -> public/model * plugin -> public/plugin * public/model/utils -> public/utils * platform/shared/mlog -> public/shared/mlog * platform/shared/i18n -> public/shared/i18n * platform/shared/markdown -> public/shared/markdown * platform/services/timezones -> public/shared/timezones * channels/einterfaces -> einterfaces * expose public/ submodule * go mod tidy * .github: cache-dependency-path, setup-go-work * modules-tidy for public/ too * remove old gomodtidy
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
070ee26081
Коммит
bb02b35048
87
server/einterfaces/metrics.go
Обычный файл
87
server/einterfaces/metrics.go
Обычный файл
@@ -0,0 +1,87 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
package einterfaces
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
|
||||
)
|
||||
|
||||
type MetricsInterface interface {
|
||||
Register()
|
||||
RegisterDBCollector(db *sql.DB, name string)
|
||||
UnregisterDBCollector(db *sql.DB, name string)
|
||||
|
||||
IncrementPostCreate()
|
||||
IncrementWebhookPost()
|
||||
IncrementPostSentEmail()
|
||||
IncrementPostSentPush()
|
||||
IncrementPostBroadcast()
|
||||
IncrementPostFileAttachment(count int)
|
||||
|
||||
IncrementHTTPRequest()
|
||||
IncrementHTTPError()
|
||||
|
||||
IncrementClusterRequest()
|
||||
ObserveClusterRequestDuration(elapsed float64)
|
||||
IncrementClusterEventType(eventType model.ClusterEvent)
|
||||
|
||||
IncrementLogin()
|
||||
IncrementLoginFail()
|
||||
|
||||
IncrementEtagHitCounter(route string)
|
||||
IncrementEtagMissCounter(route string)
|
||||
|
||||
IncrementMemCacheHitCounter(cacheName string)
|
||||
IncrementMemCacheMissCounter(cacheName string)
|
||||
IncrementMemCacheInvalidationCounter(cacheName string)
|
||||
IncrementMemCacheMissCounterSession()
|
||||
IncrementMemCacheHitCounterSession()
|
||||
IncrementMemCacheInvalidationCounterSession()
|
||||
|
||||
IncrementWebsocketEvent(eventType string)
|
||||
IncrementWebSocketBroadcast(eventType string)
|
||||
IncrementWebSocketBroadcastBufferSize(hub string, amount float64)
|
||||
DecrementWebSocketBroadcastBufferSize(hub string, amount float64)
|
||||
IncrementWebSocketBroadcastUsersRegistered(hub string, amount float64)
|
||||
DecrementWebSocketBroadcastUsersRegistered(hub string, amount float64)
|
||||
IncrementWebsocketReconnectEvent(eventType string)
|
||||
|
||||
AddMemCacheHitCounter(cacheName string, amount float64)
|
||||
AddMemCacheMissCounter(cacheName string, amount float64)
|
||||
|
||||
IncrementPostsSearchCounter()
|
||||
ObservePostsSearchDuration(elapsed float64)
|
||||
IncrementFilesSearchCounter()
|
||||
ObserveFilesSearchDuration(elapsed float64)
|
||||
ObserveStoreMethodDuration(method, success string, elapsed float64)
|
||||
ObserveAPIEndpointDuration(endpoint, method, statusCode string, elapsed float64)
|
||||
IncrementPostIndexCounter()
|
||||
IncrementFileIndexCounter()
|
||||
IncrementUserIndexCounter()
|
||||
IncrementChannelIndexCounter()
|
||||
|
||||
ObservePluginHookDuration(pluginID, hookName string, success bool, elapsed float64)
|
||||
ObservePluginMultiHookIterationDuration(pluginID string, elapsed float64)
|
||||
ObservePluginMultiHookDuration(elapsed float64)
|
||||
ObservePluginAPIDuration(pluginID, apiName string, success bool, elapsed float64)
|
||||
|
||||
ObserveEnabledUsers(users int64)
|
||||
GetLoggerMetricsCollector() mlog.MetricsCollector
|
||||
|
||||
IncrementRemoteClusterMsgSentCounter(remoteID string)
|
||||
IncrementRemoteClusterMsgReceivedCounter(remoteID string)
|
||||
IncrementRemoteClusterMsgErrorsCounter(remoteID string, timeout bool)
|
||||
ObserveRemoteClusterPingDuration(remoteID string, elapsed float64)
|
||||
ObserveRemoteClusterClockSkew(remoteID string, skew float64)
|
||||
IncrementRemoteClusterConnStateChangeCounter(remoteID string, online bool)
|
||||
|
||||
IncrementJobActive(jobType string)
|
||||
DecrementJobActive(jobType string)
|
||||
|
||||
SetReplicaLagAbsolute(node string, value float64)
|
||||
SetReplicaLagTime(node string, value float64)
|
||||
}
|
||||
Ссылка в новой задаче
Block a user