Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MM-56924: Connection invite metrics #675

Merged
merged 8 commits into from
May 28, 2024

Conversation

calebroseland
Copy link
Member

@calebroseland calebroseland commented May 28, 2024

Summary

  • Adds plugins metric sources:
    • Current pending invites
    • Pending invites limit
    • Current whitelist count

Ticket Link

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

@calebroseland calebroseland added the 2: Dev Review Requires review by a core committer label May 28, 2024
m.connectedUsersLimit = prometheus.NewGauge(prometheus.GaugeOpts{
Namespace: MetricsNamespace,
Subsystem: MetricsSubsystemApp,
Name: "whitelist_limit", // really: connected_users_limit
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metric name unchanged; should we rename to avoid confusion with new whitelist terminology?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be in favor of changing the name; we are not in production so nobody really depends on it, yet.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to rename! Easy to update dashboards :)

Copy link
Member

@JulienTant JulienTant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@lieut-data lieut-data left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just a few comments for discussion before approving.

Comment on lines 75 to 86
msteams_invited_users: {
name: 'MS Teams: Invited Users',
id: 'msteams_invited_users',
icon: 'fa-users', // font-awesome-4.7.0 handler
value: siteStats?.pending_invited_users || 0,
},
msteams_whitelisted_users: {
name: 'MS Teams: Whitelisted Users',
id: 'msteams_whitelisted_users',
icon: 'fa-users', // font-awesome-4.7.0 handler
value: siteStats?.current_whitelist_users || 0,
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we should consider keeping this as a metric / Grafana dashboard only for now, vs. exposing to the enduser? It's the kind of data that's transiently useful (vs. connected count, which shows volume / adoption).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm perfectly happy to remove them, but I do think they provide some value in monitoring or any potential troubleshooting during the initial rollout. 1/5

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could leave them as "extra" stats in the api request, but then just not show them in the site statistics page.

m.connectedUsersLimit = prometheus.NewGauge(prometheus.GaugeOpts{
Namespace: MetricsNamespace,
Subsystem: MetricsSubsystemApp,
Name: "whitelist_limit", // really: connected_users_limit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to rename! Easy to update dashboards :)

@@ -354,6 +353,7 @@ func NewMetrics(info InstanceInfo) Metrics {
}, []string{"action"})
m.registry.MustRegister(m.syncMsgFileDelayTime)

// connected, invited, whitelisted
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean connected + invited + whitelisted? I'd like to make sure we can still measure actual connections separately.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that's just a section header (ending on :403). Each metric is still separate.

@lieut-data lieut-data added this to the v1.14 milestone May 28, 2024
@calebroseland calebroseland added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core committer labels May 28, 2024
@calebroseland calebroseland merged commit 25789dd into main May 28, 2024
9 checks passed
@calebroseland calebroseland deleted the MM-56924-invite-and-whitelist-metrics branch May 28, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants