Skip to content
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

Support console env var DO_NOT_TRACK #3540

Closed
sethwoodworth opened this issue Jul 6, 2021 · 2 comments · Fixed by #5000
Closed

Support console env var DO_NOT_TRACK #3540

sethwoodworth opened this issue Jul 6, 2021 · 2 comments · Fixed by #5000
Labels
enhancement New feature or request good_first_issue Straightforward + self-contained changes, good for new contributors!

Comments

@sethwoodworth
Copy link
Contributor

Describe the feature

If the console environment variable DO_NOT_TRACK is set (to any value), do not send anonymous usage stats. The current configuration equivalent is in ~/.dbt/profiles.yml

config:
  send_anonymous_usage_stats: False

The website promoting and documenting the standard is: https://consoledonottrack.com/

Describe alternatives you've considered

The current yaml config: send_anonymous_usage_stats serves the same purpose, but is specific to DBT, where DO_NOT_TRACK is intended to be universal.

Who will this benefit?

Users who would like to avoid sending usage statistics by default would no longer need to:

  • discover dbt sends usage statistics
  • read documentation to find how to opt-out

Are you interested in contributing this feature?

Yes, I would be more than willing to implement the feature if the issue is accepted.

@sethwoodworth sethwoodworth added enhancement New feature or request triage labels Jul 6, 2021
@jtcohen6 jtcohen6 added good_first_issue Straightforward + self-contained changes, good for new contributors! and removed triage labels Jul 6, 2021
@jtcohen6
Copy link
Contributor

jtcohen6 commented Jul 6, 2021

@sethwoodworth Thanks for opening the issue! This sounds like a great standard to follow. I'd be interested in supporting this via two env vars:

  • DO_NOT_TRACK=0|1 (standard)
  • SEND_ANONYMOUS_USAGE_STATS=True|False (dbt-specific)

Ultimately, I'd like for every runtime config to have an associated flag, profile config, and env var, as outlined in #2990.

In any case, I'd welcome a contribution for this.

@jtcohen6
Copy link
Contributor

jtcohen6 commented Oct 13, 2021

We've implemented this as DBT_SEND_ANONYMOUS_USAGE_STATS=True|False for v1.0.0-b1, as part of the work to implement #2990.

Many of the issues/PRs linked from https://consoledonottrack.com/ seem to have gotten ... quite heated ... and were ultimately closed, but I don't see a really good reason to oppose adding/aliasing the same functionality with DO_NOT_TRACK, even if it hasn't yet been adopted as a universal standard.

mirnawong1 added a commit to dbt-labs/docs.getdbt.com that referenced this issue Jan 8, 2024
…rue` (#4713)

## What are you changing in this pull request and why?

While responding to dbt-labs/dbt-core#9336, I
set `DO_NOT_TRACK=0` and examined the result. It does not behave the
same way as `DBT_SEND_ANONYMOUS_USAGE_STATS=True`.

Looking at the source code
[here](https://github.com/dbt-labs/dbt-core/blob/11cc71b75fa64b09888461339eb1eb3b394f9528/core/dbt/cli/flags.py#L252-L254)
explains why.

So we can safely just remove this line from the docs for
[`send_anonymous_usage_stats`](https://docs.getdbt.com/reference/global-configs/usage-stats)
to avoid confusion.

## Additional info

We first added support for the [Console Do Not
Track](https://consoledonottrack.com/) initiative within
dbt-labs/dbt-core#5000 as described in
dbt-labs/dbt-core#3540.

Any of the following are equivalent to
`DBT_SEND_ANONYMOUS_USAGE_STATS=False` (whether they are uppercase,
lowercase, or mixed case):
```
export DO_NOT_TRACK=1
export DO_NOT_TRACK=t
export DO_NOT_TRACK=true
export DO_NOT_TRACK=y
export DO_NOT_TRACK=yes
```

Any other values of `DO_NOT_TRACK` are ignored altogether and not have
any effect.

## Checklist
- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
so my content adheres to these guidelines.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good_first_issue Straightforward + self-contained changes, good for new contributors!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants