-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Replace tracking events: project_id
, adapter_info
#7231
Replace tracking events: project_id
, adapter_info
#7231
Conversation
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. |
core/dbt/tracking.py
Outdated
INVOCATION_ENV_SPEC = "iglu:com.dbt/invocation_env/jsonschema/1-0-0" | ||
PACKAGE_INSTALL_SPEC = "iglu:com.dbt/package_install/jsonschema/1-0-0" | ||
RPC_REQUEST_SPEC = "iglu:com.dbt/rpc_request/jsonschema/1-0-1" | ||
ADAPTER_INFO_SPEC = "iglu:com.dbt/adapter_info/jsonschema/1-0-0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you haven't already, I think we'll need to add these two new validation schemas to https://github.com/dbt-labs/iglu.sinter-collect.com
Doc: https://www.notion.so/dbtlabs/Add-new-metrics-to-tracking-in-dbt-3484cc31b8f449dfa2e960d2bbb15afe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeppers.
https://github.com/dbt-labs/iglu.sinter-collect.com/pull/67 although there seems to be an issue with circle CI we'll need to fix if we want to enforce the checks there.
INVOCATION_ENV_SPEC = "iglu:com.dbt/invocation_env/jsonschema/1-0-0" | ||
INVOCATION_SPEC = "iglu:com.dbt/invocation/jsonschema/1-0-2" | ||
LOAD_ALL_TIMING_SPEC = "iglu:com.dbt/load_all_timing/jsonschema/1-0-3" | ||
PACKAGE_INSTALL_SPEC = "iglu:com.dbt/package_install/jsonschema/1-0-0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alphabetical order, nice 👍
The events outlined here exist to support "very very old versions of dbt-core, which expected to look directly at the HEAD branch of this github repo to find validation schemas". | ||
|
||
Eventually these should go away (see https://github.com/dbt-labs/dbt-core/issues/7228) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
project_id
, adapter_type
, adapter_unique_id
project_id
, adapter_type
, adapter_unique_id
project_id
, adapter_info
dbt.tracking.track_project_id({"project_id": project_id}) | ||
dbt.tracking.track_adapter_info( | ||
{ | ||
"adapter_type": adapter_type, | ||
"adapter_unique_id": adapter_unique_id, | ||
} | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If project_id
, adapter_type
, and adapter_unique_id
can be None
, would we still want to fire these tracking events with only None
s?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume so, but that's just mimicking the logic that was in place previously. @jtcohen6, thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed!
dbt.tracking.track_project_id({"project_id": project_id}) | ||
dbt.tracking.track_adapter_info( | ||
{ | ||
"adapter_type": adapter_type, | ||
"adapter_unique_id": adapter_unique_id, | ||
} | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed!
Resolves #6097 resolves #6098
Description
Replaces the
project id
,adapter_type
, andadapter_unique_id
events fields removed during the Click refactor due to timing issues. These values will now be generated in the init of the BaseTask since it's the earliest place we can get that info reliably.Checklist
changie new
to create a changelog entry