-
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
DBT model instrumentation #11268
base: main
Are you sure you want to change the base?
DBT model instrumentation #11268
Conversation
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @sfc-gh-vguttha |
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. |
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @sfc-gh-vguttha |
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @sfc-gh-vguttha |
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.
Consider to add tests, for that you can use the in memory SpanProcessor, make sure if you do that to use the SDK as a test dependency only.
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @sfc-gh-vguttha |
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @sfc-gh-vguttha |
git+https://github.com/sfc-gh-vguttha/dbt-adapters.git@vguttha-add-telemetry#subdirectory=dbt-adapters | ||
git+https://github.com/dbt-labs/dbt-adapters.git@main#subdirectory=dbt-tests-adapter | ||
git+https://github.com/dbt-labs/dbt-common.git@main | ||
git+https://github.com/dbt-labs/dbt-adapters.git@main#subdirectory=dbt-postgres | ||
git+https://github.com/sfc-gh-vguttha/dbt-adapters.git@vguttha-add-telemetry#subdirectory=dbt-snowflake |
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.
FYI: will revert these changes once I am fully complete with my testing.
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @sfc-gh-vguttha |
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @sfc-gh-vguttha |
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.
Please add the following description:
**OpenTelemetry API:** The API defines the interface for how to instrument your code. It specifies the functions and methods you use to generate telemetry data (traces, metrics, and logs). It's essentially a set of rules and specifications that dictate how instrumentation should be implemented. The API is no-op by default unless an SDK is configured.
**OpenTelemetry SDK:** The SDK provides the implementation of the API. It contains the actual code that collects, processes, and exports the telemetry data generated by the API. It handles the heavy lifting of managing telemetry data, such as sampling, buffering, and exporting it to observability backends.
@@ -242,10 +261,16 @@ def call_runner(self, runner: BaseRunner) -> RunResult: | |||
result = None | |||
thread_exception = e | |||
finally: | |||
if result.status in (NodeStatus.Error, NodeStatus.Fail, NodeStatus.PartialSuccess): | |||
node_span.set_status(StatusCode.ERROR) | |||
node_span.set_attribute("node.status", result.status.value) |
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.
Add this as the description for the status?
@@ -242,10 +261,16 @@ def call_runner(self, runner: BaseRunner) -> RunResult: | |||
result = None | |||
thread_exception = e | |||
finally: |
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.
In Java I know that the resource (in try-with-resource pattern) is closed before calling finally (would be the span in this case). Is this the case in Python as well?
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.
but this try-catch-finally is different inner scope within with block correct?
if result is not None: | ||
fire_event( | ||
NodeFinished( | ||
node_info=runner.node.node_info, | ||
node_info=node_info, |
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.
Why this change?
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 had to refer some attributes in node_info at different place and using full name seems lengthy and difficult to read hence shortened it.
@@ -256,7 +281,7 @@ def call_runner(self, runner: BaseRunner) -> RunResult: | |||
GenericExceptionOnRun( | |||
unique_id=runner.node.unique_id, | |||
exc=str(thread_exception), | |||
node_info=runner.node.node_info, | |||
node_info=node_info, |
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.
ditto.
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @sfc-gh-vguttha |
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @sfc-gh-vguttha |
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @sfc-gh-vguttha |
OpenTelemetry API: The API defines the interface for how to instrument your code. It specifies the functions and methods you use to generate telemetry data (traces, metrics, and logs). It's essentially a set of rules and specifications that dictate how instrumentation should be implemented. The API is no-op by default unless an SDK is configured.
OpenTelemetry SDK: The SDK provides the implementation of the API. It contains the actual code that collects, processes, and exports the telemetry data generated by the API. It handles the heavy lifting of managing telemetry data, such as sampling, buffering, and exporting it to observability backends.
Problem
Solution
Checklist