Modifies the interface to add search index metrics and initialises metrics first so it can be used from elasticsearch (#13663)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
71ceb7f18f
Коммит
eb17f8436f
@@ -120,6 +120,9 @@ func RegisterNotificationInterface(f func(*App) einterfaces.NotificationInterfac
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) initEnterprise() {
|
func (s *Server) initEnterprise() {
|
||||||
|
if metricsInterface != nil {
|
||||||
|
s.Metrics = metricsInterface(s.FakeApp())
|
||||||
|
}
|
||||||
if accountMigrationInterface != nil {
|
if accountMigrationInterface != nil {
|
||||||
s.AccountMigration = accountMigrationInterface(s)
|
s.AccountMigration = accountMigrationInterface(s)
|
||||||
}
|
}
|
||||||
@@ -135,9 +138,6 @@ func (s *Server) initEnterprise() {
|
|||||||
if messageExportInterface != nil {
|
if messageExportInterface != nil {
|
||||||
s.MessageExport = messageExportInterface(s.FakeApp())
|
s.MessageExport = messageExportInterface(s.FakeApp())
|
||||||
}
|
}
|
||||||
if metricsInterface != nil {
|
|
||||||
s.Metrics = metricsInterface(s.FakeApp())
|
|
||||||
}
|
|
||||||
if notificationInterface != nil {
|
if notificationInterface != nil {
|
||||||
s.Notification = notificationInterface(s.FakeApp())
|
s.Notification = notificationInterface(s.FakeApp())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,4 +45,7 @@ type MetricsInterface interface {
|
|||||||
ObservePostsSearchDuration(elapsed float64)
|
ObservePostsSearchDuration(elapsed float64)
|
||||||
ObserveStoreMethodDuration(method string, success string, elapsed float64)
|
ObserveStoreMethodDuration(method string, success string, elapsed float64)
|
||||||
ObserveApiEndpointDuration(endpoint string, elapsed float64)
|
ObserveApiEndpointDuration(endpoint string, elapsed float64)
|
||||||
|
IncrementPostIndexCounter()
|
||||||
|
IncrementUserIndexCounter()
|
||||||
|
IncrementChannelIndexCounter()
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user