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

dbt-770 Fix-1.9.0 Removed unnecessary tracker logging. #211

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions dbt/adapters/impala/cloudera_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ class TrackingEventType:
warehouse_info = {"warehouse_version": {"version": "NA", "build": "NA"}}


def log_initial_message():
logger.debug(
f"Usage tracking flag {usage_tracking}. To turn on/off use usage_tracking flag in profiles.yml"
)


def populate_platform_info(cred: Credentials, ver):
"""
populate platform info to be passed on for tracking
Expand Down Expand Up @@ -200,13 +206,8 @@ def track_usage(tracking_payload):

global usage_tracking

logger.debug(
f"Usage tracking flag {usage_tracking}. To turn on/off use usage_tracking flag in profiles.yml"
)

# if usage_tracking is disabled, quit
if not usage_tracking:
logger.debug(f"Skipping Event {tracking_payload}")
return

# fix the schema of tracking payload to be common for all events
Expand Down
2 changes: 2 additions & 0 deletions dbt/adapters/impala/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ def __post_init__(self):

# set the usage tracking flag
tracker.usage_tracking = self.usage_tracking
# log the initialization message once
tracker.log_initial_message()
# get platform information for tracking
tracker.populate_platform_info(self, ver)
# get dbt deployment env information for tracking
Expand Down