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

Add adapter telemetry to snowplow event. #10859

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

VersusFacit
Copy link
Contributor

Resolves dbt-labs/dbt-adapters#301

Solution

We propose exposing a method on the base adapter that will use existing snowplow infrastructure for tracking user statistics for any adapter.

We designed the json schema and event data to make it easy for us to add additional per-adapter information as use-cases emerge.

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

@VersusFacit VersusFacit self-assigned this Oct 16, 2024
@VersusFacit VersusFacit requested a review from a team as a code owner October 16, 2024 10:24
@cla-bot cla-bot bot added the cla:yes label Oct 16, 2024
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

1 similar comment
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@VersusFacit VersusFacit added the Skip Changelog Skips GHA to check for changelog file label Oct 16, 2024
Copy link

codecov bot commented Oct 16, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 62.11%. Comparing base (3d96b4e) to head (d56914c).

❗ There is a different number of reports uploaded between BASE (3d96b4e) and HEAD (d56914c). Click for more details.

HEAD has 17 uploads less than BASE
Flag BASE (3d96b4e) HEAD (d56914c)
unit 3 1
integration 15 0
Additional details and impacted files
@@             Coverage Diff             @@
##             main   #10859       +/-   ##
===========================================
- Coverage   89.15%   62.11%   -27.04%     
===========================================
  Files         183      183               
  Lines       23443    23445        +2     
===========================================
- Hits        20901    14564     -6337     
- Misses       2542     8881     +6339     
Flag Coverage Δ
integration ?
unit 62.11% <60.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 62.11% <60.00%> (-0.01%) ⬇️
Integration Tests 62.11% <60.00%> (-27.04%) ⬇️

core/dbt/task/run.py Outdated Show resolved Hide resolved
core/dbt/task/run.py Outdated Show resolved Hide resolved
@@ -133,6 +139,7 @@ def track_model_run(index, num_nodes, run_model_result):
"contract_enforced": contract_enforced,
"access": access,
"versioned": versioned,
"adapter_info": asdict(adapter_info),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered that this should be something JSON safe, which a Python dict is 🫡

core/dbt/task/run.py Outdated Show resolved Hide resolved
core/dbt/tracking.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes Skip Changelog Skips GHA to check for changelog file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Adapters Model Configuration Snowplow Tracking
3 participants