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

[CT-586] [Feature] Improve tracking error message #5197

Closed
1 task done
NicolasPA opened this issue Apr 29, 2022 · 1 comment · Fixed by #5211
Closed
1 task done

[CT-586] [Feature] Improve tracking error message #5197

NicolasPA opened this issue Apr 29, 2022 · 1 comment · Fixed by #5211
Labels
enhancement New feature or request good_first_issue Straightforward + self-contained changes, good for new contributors! logging

Comments

@NicolasPA
Copy link
Contributor

NicolasPA commented Apr 29, 2022

Is this your first time opening an issue?

Describe the Feature

The tracking error "Error sending message, disabling tracking" should be more helpful by being more descriptive:

  • It is not obvious that it is related to DBT's internal anonymous usage statistics.
  • What "disabling" means also isn't clear, as far as I understand, it only disables it for the current execution, the next run will still have the error. Permanent disabling requires setting it in the profile or in environment variables as described here: https://docs.getdbt.com/reference/global-configs#send-anonymous-usage-stats

So I suggest this more descriptive message which could save people time:
Error sending anonymous usage statistics. Disabling tracking for this execution. If you wish to permanently disable tracking, see: https://docs.getdbt.com/reference/global-configs#send-anonymous-usage-stats .

In my case, I am using DBT 1.0.4 on Windows 10 in an environment without internet for regulatory reasons, so tracking can never happen.

Describe alternatives you've considered

  1. Do users need to know that DBT internal tracking failed? You could show it only in debug mode when the --debug flag is used. But it still requires a more descriptive message, I think.
  2. DBT could test if a connection to the internet exists, and silently disable tracking if it doesn't. But that's a bit more work than just editing an error message, and running DBT without internet probably doesn't represent a big percentage of use cases.

Who will this benefit?

Anyone using DBT without an internet connection.

Are you interested in contributing this feature?

Sure, I should be able to handle editing a string!

@NicolasPA NicolasPA added enhancement New feature or request triage labels Apr 29, 2022
@github-actions github-actions bot changed the title [Feature] Improve tracking error message [CT-586] [Feature] Improve tracking error message Apr 29, 2022
@jtcohen6
Copy link
Contributor

@NicolasPA Agree + agree! Let's update this error message, and make it DebugLevel instead of WarnLevel.

@dataclass
class DisableTracking(WarnLevel):
code: str = "Z039"
def message(self) -> str:
return "Error sending message, disabling tracking"

Have at it :)

@jtcohen6 jtcohen6 added good_first_issue Straightforward + self-contained changes, good for new contributors! logging and removed triage labels Apr 29, 2022
NicolasPA added a commit to NicolasPA/dbt-core that referenced this issue May 3, 2022
The error message logged when tracking posting fails now makes it more
obvious that it is related to DBT's internal anonymous usage
statistics, and explains how to disable it.

As tracking failure doesn't real concern most users, we also reduce the
logging level to "DEBUG" so it doesn't appear during normal use.

Issue dbt-labs#5197

Signed-off-by: NicolasPA <22459427+NicolasPA@users.noreply.github.com>
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! logging
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants