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

Remove deprecated track_struct_event #10736

Merged
merged 1 commit into from
Sep 18, 2024
Merged
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
13 changes: 7 additions & 6 deletions core/dbt/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from snowplow_tracker import Emitter, SelfDescribingJson, Subject, Tracker
from snowplow_tracker import __version__ as snowplow_version # type: ignore
from snowplow_tracker import logger as sp_logger
from snowplow_tracker.events import StructuredEvent

from dbt import version as dbt_version
from dbt.adapters.exceptions import FailedToConnectError
Expand Down Expand Up @@ -215,12 +216,12 @@
def track(user, *args, **kwargs):
if user.do_not_track:
return
else:
fire_event(SendingEvent(kwargs=str(kwargs)))
try:
tracker.track_struct_event(*args, **kwargs)
except Exception:
fire_event(SendEventFailure())

fire_event(SendingEvent(kwargs=str(kwargs)))
try:
tracker.track(StructuredEvent(*args, **kwargs))
except Exception:
fire_event(SendEventFailure())

Check warning on line 224 in core/dbt/tracking.py

View check run for this annotation

Codecov / codecov/patch

core/dbt/tracking.py#L223-L224

Added lines #L223 - L224 were not covered by tests


def track_project_id(options):
Expand Down
Loading