-
Notifications
You must be signed in to change notification settings - Fork 29
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-37324] Add telemetry #230
Conversation
Adding @enelson720 so this is on his radar. @larkox can we log when each user has authenticated with each app? (or some indication of how many different users are using an app on a particular server)
|
@aaronrothschild It is possible to log each time a user finish the OAuth steps for App X if the App X is using the Mattermost OAuth abstraction (mainly useful for lambda). It is also possible for the calls register the acting user ID, and therefore see how many people per server is using the bindings. Nevertheless, we would have to do some filtering (either on code or interpreting the analytics) to filter out the "get bindings" call, since that one will be done by all users. |
@larkox I'd like to track those actions so we can track installation vs authentication vs ongoing usage if possible. |
server/telemetry/telemetry.go
Outdated
return | ||
} | ||
|
||
_ = t.tracker.TrackEvent("uninstall", map[string]interface{}{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"uninstall"- > "call' ?
server/telemetry/telemetry.go
Outdated
}) | ||
} | ||
|
||
func (t *Telemetry) TrackCall(appID string, location string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could this be too noisy - tracking every call? It can boil down to what are our goals with this change (like what metrics are we targeting, what do we want to understand better, etc.). Also, do we envision (in the future) for users/app developers to pick and choose what telemetry they want to record, specific to their app (like having two types of telemetry metrics - ours and theirs)? cc: @aaronrothschild
I have added a new event for OAuth complete, and instead of tracking every single call (including bindings calls) we will just be registering "submit calls". |
What's up with cypress tests? |
Codecov Report
@@ Coverage Diff @@
## master #230 +/- ##
==========================================
+ Coverage 24.77% 24.79% +0.02%
==========================================
Files 52 52
Lines 3306 3311 +5
==========================================
+ Hits 819 821 +2
- Misses 2407 2410 +3
Partials 80 80
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work 👍 Looking forward to seeing the metrics
@DHaussermann Gentle reminder to review this. Not sure if you want to test it, since it is just adding telemetry. |
@DHaussermann Friendly reminder on this. |
@larkox Also here |
Added the environment variable to work with telemetry. |
Discussed offline. QA testing will happen on Community. @larkox Please merge. |
FYI @enelson720 this is new Telemetry that will be coming in for Apps Framework (ie: apps installed, uninstalled, etc.) @larkox for future, would it make sense for us to track "how" an app is installed? (marketplace vs |
@aaronrothschild Yes, it makes sense. Not 100% sure if we have the mechanism to make the distinction (I guess so, but not 100% sure). Feel free to create a ticket to track it. |
Summary
Add telemetry to the Apps Framework. Right now only the proxy package has access to the telemetry, but it can be easily added to any other package that needs it. We are tracking:
Feel free to suggest any other event worth tracking.
Ticket Link
https://mattermost.atlassian.net/browse/MM-37324