Closed rupareddy5-21 closed 1 year ago
On a second thought, if we're just gonna have two flags, one to --enable/disable
and one for --status
why do we need to have a separate sub command? Can't we just have it as two flags under the main 'swa' command like '--telemetryswa --telemetry=false
) and another flag like swa --telemetry-status
to show the status.
What do you think about this @sulabh-msft and @manekinekko ?
On a second thought, if we're just gonna have two flags, one to
--enable/disable
and one for--status
why do we need to have a separate sub command? Can't we just have it as two flags under the main 'swa' command like '--telemetry' (takes bool as input for enabling/disabling the telemetry. Ex:swa --telemetry=false
) and another flag likeswa --telemetry-status
to show the status. What do you think about this @sulabh-msft and @manekinekko ?
@rupareddy5-21 and I discussed about this. While it is an easier implementation, it has a couple of catches.
swa --telemetry=false
, we already have swa
itself as an executable command and we'll have to make code changes to ensure if --telemetry
is used then we shouldn't trigger swa
.swa start ./dist --api-location=api --telemetry=false
needs us to not capture the swa start
in the telemetry as wellDue to all this, we thought having a separate command group will be the cleanest and most user-friendly way of doing this.
@rupareddy5-21 and I discussed about this. While it is an easier implementation, it has a couple of catches.
- if it is limited to just a global flag usage, i.e.
swa --telemetry=false
, we already haveswa
itself as an executable command and we'll have to make code changes to ensure if--telemetry
is used then we shouldn't triggerswa
.- If it is a part of a string of other flags, recognizing it as a separate globally actionable flag will be tricky
- Also, since this is regarding telemetry capturing, this flag will have to take priority over other flags and thus if it is present, we need to add rules to not capture telemetry even for the command when it is called out (e.g.
swa start ./dist --api-location=api --telemetry=false
needs us to not capture theswa start
in the telemetry as wellDue to all this, we thought having a separate command group will be the cleanest and most user-friendly way of doing this.
Replying to your points
swa --telemetry
will be nothing different than invoking swa --version
which is a global flag. Upon saying this, I think since this is a big change it'd be better to have a discussion before merging this.
Please get the PR reviewed by Vamsi as well.
Rupa, can you resolve the previous comments?
Added commands to disable/enable telemetry capturing. Command would look like
swa telemetry --disable/enable
. Also added an environment variableSWA_DISABLE_TELEMETRY
where users can set the value to true/false. Users can check the status of telemetry capturing using the commandswa telemetry --status
. Only one of these flags can be used at a time.