-
Notifications
You must be signed in to change notification settings - Fork 196
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
feat(cli): collect cli analytics #3185
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hasanaburayyan
commented
Jul 5, 2023
hasanaburayyan
commented
Jul 5, 2023
hasanaburayyan
commented
Jul 5, 2023
hasanaburayyan
force-pushed
the
hasan/cli-analytics
branch
3 times, most recently
from
July 6, 2023 20:16
e721d2f
to
f445075
Compare
hasanaburayyan
changed the title
[WIP] feat(cli): collect cli analytics
feat(cli): collect cli analytics
Jul 6, 2023
Signed-off-by: monada-bot[bot] <[email protected]>
Signed-off-by: monada-bot[bot] <[email protected]>
Signed-off-by: monada-bot[bot] <[email protected]>
Signed-off-by: monada-bot[bot] <[email protected]>
Signed-off-by: monada-bot[bot] <[email protected]>
Signed-off-by: monada-bot[bot] <[email protected]>
Signed-off-by: monada-bot[bot] <[email protected]>
Signed-off-by: monada-bot[bot] <[email protected]>
Signed-off-by: monada-bot[bot] <[email protected]>
hasanaburayyan
force-pushed
the
hasan/cli-analytics
branch
from
July 6, 2023 21:25
0b7ad7d
to
0a68775
Compare
Re-opened in another PR: #3310 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is just the initial thought dump I have done so far on setting up CLI analytics for anyone who may be interested in seeing the code before its ready for review 😁
Currently this PR introduces some recorded analytics that can be opted out of using
WING_DISABLE_ANALYTICS
env var.This is an example of what the metrics currently look like in segment
Implementation Details
In order to ensure we are not slowing down the user experience when running any CLI command, the process for collecting metrics works in 3 main components. Similar to how other CLI tools I have come across collect metrics.
Right now the best way I am seeing to collect cli command specific data is by using Commander hooks around all the commands we want to collect analytics from (which right now I have as all of them)
Misc
To make testing easier right now im just storing analytics in
cwd
but I plan to move this storage file to the user's home directory under.wing
TODO:
Closes: #2928
Closes: #2974
Checklist
pr/e2e-full
label if this feature requires end-to-end testingBy submitting this pull request, I confirm that my contribution is made under the terms of the Monada Contribution License.