-
Notifications
You must be signed in to change notification settings - Fork 5
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
Preflight Checks: Implement event tracking #307
Conversation
@@ -31,7 +31,7 @@ | |||
"command-line-usage": "^6.1.1", | |||
"enquirer": "^2.3.6", | |||
"execa": "^4.0.0", | |||
"node-fetch": "^3.1.1", | |||
"node-fetch": "^2.6.7", |
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.
Had to rollback node-fetch
to the latest version of the previous major version (2
) due to incompatibility with ES modules.
/** | ||
* External dependencies | ||
*/ | ||
import fetch from 'node-fetch'; |
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.
probably a good candidate for vip-go-node-internal
once we figure it out as a package
Description
In order to measure usage of the Preflight Checks, this PR implements Tracks to track analytics on the executed tests, using the event
vip_preflight_checks_finish
.This implementation is very simplistic, and it's forked from the VIP CLI. It sends the following parameters with the event:
cli_version
- version of the Preflight Checks CLInode_version
- version of Node.js used to execute the CLIos_name
- Operating Systemos_version
- Operating system version/kernel versionport
- Selected (or randomly generated) port used for the checksselected_node_version
- Node.js version selected to run the checksverbose
-true
, if running in verbose modewait
- selected wait timeis_success
/is_failed
/is_warning
- boolean value that flag if checks succeeded, if there are any warnings, or if failed.Steps to Test
npm run build
.cd
to a VIP Go node site repositorynode [path-to-vip-go-node-repo]/preflight-checks/dist/index.js