Add metrics for mobile versions snapshots (#28191)

* Add metrics for mobile versions snapshots

* Add notifications disabled and fix lint

* Address feedback

* Verify all references to JobTypeActiveUsers

* Fix typos

* Improve platform values

* Add test and MySQL support
This commit is contained in:
Daniel Espino García
2024-09-24 12:02:19 +02:00
committed by GitHub
parent d45a54a8e9
commit 040838b056
17 changed files with 489 additions and 0 deletions

View File

@@ -118,4 +118,6 @@ type MetricsInterface interface {
ObserveMobileClientLoadDuration(platform string, elapsed float64)
ObserveMobileClientChannelSwitchDuration(platform string, elapsed float64)
ObserveMobileClientTeamSwitchDuration(platform string, elapsed float64)
ClearMobileClientSessionMetadata()
ObserveMobileClientSessionMetadata(version string, platform string, value float64, notificationDisabled string)
}

View File

@@ -28,6 +28,11 @@ func (_m *MetricsInterface) AddMemCacheMissCounter(cacheName string, amount floa
_m.Called(cacheName, amount)
}
// ClearMobileClientSessionMetadata provides a mock function with given fields:
func (_m *MetricsInterface) ClearMobileClientSessionMetadata() {
_m.Called()
}
// DecrementHTTPWebSockets provides a mock function with given fields: originClient
func (_m *MetricsInterface) DecrementHTTPWebSockets(originClient string) {
_m.Called(originClient)
@@ -373,6 +378,11 @@ func (_m *MetricsInterface) ObserveMobileClientLoadDuration(platform string, ela
_m.Called(platform, elapsed)
}
// ObserveMobileClientSessionMetadata provides a mock function with given fields: version, platform, value, notificationDisabled
func (_m *MetricsInterface) ObserveMobileClientSessionMetadata(version string, platform string, value float64, notificationDisabled string) {
_m.Called(version, platform, value, notificationDisabled)
}
// ObserveMobileClientTeamSwitchDuration provides a mock function with given fields: platform, elapsed
func (_m *MetricsInterface) ObserveMobileClientTeamSwitchDuration(platform string, elapsed float64) {
_m.Called(platform, elapsed)