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-43660] Expose some client-side metrics through /call stats command #57

Merged
merged 1 commit into from
May 4, 2022

Conversation

streamer45
Copy link
Collaborator

Summary

Adding a new utility command /call stats to expose some client-side metrics.
Command will generate an ephemeral message with the collected metrics in JSON, e.g.:

image

This will be useful to debug possible client-side conditions (e.g. networking) affecting calls quality.

Ticket Link

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

@streamer45 streamer45 added the 2: Dev Review Requires review by a core committer label May 2, 2022
@streamer45 streamer45 requested a review from cpoile May 2, 2022 18:18
@streamer45 streamer45 self-assigned this May 2, 2022
Copy link
Member

@cpoile cpoile left a comment

Choose a reason for hiding this comment

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

Nice!

try {
const stats = await window.callsClient.getStats();
console.log(JSON.stringify(stats, null, 2));
return {message: `/call stats "${JSON.stringify(stats)}"`, args};
Copy link
Member

Choose a reason for hiding this comment

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

Heh, this is clever. I never would have thought to do this. Makes it simpler to display to the user. 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's horribly clever 🙈 . To be honest I wanted a way to display an ephemeral message directly from the client but to my surprise it doesn't look like possible. The solution is hacky but it gets the job done so why not.

@streamer45 streamer45 added 3: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core committer labels May 4, 2022
@streamer45 streamer45 merged commit 4c16e72 into main May 4, 2022
@streamer45 streamer45 deleted the MM-43660 branch May 4, 2022 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants