mattermost / mattermost-plugin-msteams

MS Teams plugin for Mattermost
Other
13 stars 11 forks source link

[MM-57918] Add Metrics for Primary Platform #616

Closed JulienTant closed 5 months ago

JulienTant commented 5 months ago

Summary

Exposes 2 new metrics:

In those definitions, active = has a token set.

There's a lot of "noise" because I had to move a few constants in storemodels to be able to reuse them in the store package.

Ticket Link

https://mattermost.atlassian.net/browse/MM-57918

JulienTant commented 5 months ago

@sbishel before you ask... :P I ran a test with 25K users, the whole GetStats() was between 30ms to 40ms (I changed the updateMetrics constant to 1minute for my tests and waited 10min to get enough sample data)

Results looks like this:

msteams_connect_app_connected_users 25428
msteams_connect_app_mattermost_primary 15946
msteams_connect_app_msteams_primary 9482
lindy65 commented 5 months ago

Thanks for adding the QA-deferred label @JulienTant - this will be tested post-merge.

JulienTant commented 5 months ago

gentle ping @mgdelacroix ; I have a second PR coming that changes the same code 😅

JulienTant commented 5 months ago

Thanks @mgdelacroix I applied aliases, much easier to read indeed!