mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-20 22:23:07 +00:00
Add ability to disable analytics for performance testing
Change-type: patch Connects-to: #1708 Signed-off-by: Scott Lowe <scott@balena.io>
This commit is contained in:
parent
ac49246141
commit
950d173d27
@ -104,8 +104,11 @@ export async function trackCommand(commandSignature: string) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Don't actually call mixpanel.track() while running test cases
|
// Don't actually call mixpanel.track() while running test cases, or if suppressed
|
||||||
if (!process.env.BALENA_CLI_TEST_TYPE) {
|
if (
|
||||||
|
!process.env.BALENA_CLI_TEST_TYPE &&
|
||||||
|
!process.env.BALENARC_NO_ANALYTICS
|
||||||
|
) {
|
||||||
await mixpanel.track(`[CLI] ${commandSignature}`, {
|
await mixpanel.track(`[CLI] ${commandSignature}`, {
|
||||||
distinct_id: username,
|
distinct_id: username,
|
||||||
version: packageJSON.version,
|
version: packageJSON.version,
|
||||||
|
Loading…
Reference in New Issue
Block a user