mssql-cli icon indicating copy to clipboard operation
mssql-cli copied to clipboard

mssql-cli does not offer to disable telemetry

Open posguy99 opened this issue 4 years ago • 1 comments

As above. No one is OWED telemetry, it should be opt-in.

But to not inform on first run that telemetry is being sent? That's just wrong.

posguy99 avatar Jul 17 '21 18:07 posguy99

incase anyone finds this useful:

from mssql-cli/mssqlcli/telemetry.py

def _user_agrees_to_telemetry(func):
    @wraps(func)
    def _wrapper(*args, **kwargs):
        user_opted_out = os.environ.get(MSSQL_CLI_TELEMETRY_OPT_OUT, False)
        if user_opted_out in ['True', 'true', '1']:
            return None
        return func(*args, **kwargs)

    return _wrapper

chrisg123 avatar Sep 10 '21 00:09 chrisg123