-
Notifications
You must be signed in to change notification settings - Fork 118
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
SNOW-1341730:Emit spans for UDxF registrations #1648
Conversation
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
1 similar comment
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
69803b1
to
751aa14
Compare
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
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.
This change looks good to me wrt local testing. This telemetry looks like something we should disable when running in local testing mode. Is that currently the case?
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
1 similar comment
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
dad0413
to
dd86223
Compare
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
tracer = ( | ||
trace.get_tracer(f"snow.snowpark.{class_name.split('.')[0].lower()}") | ||
tracer = trace.get_tracer( | ||
f"snow.snowpark.{class_name.split('.')[0].lower()}" |
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.
snow or 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.
it is snow, this is a naming tradition from telemetry team and they want to keep it the same
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
try: | ||
yield | ||
except Exception as e: | ||
cur_span.set_status(Status(StatusCode.ERROR, str(e))) |
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 think you can use trace.Status
instead and avoid import as well. It is clearer which status you are referring to.
@@ -56,6 +61,59 @@ def open_telemetry_context_manager(func, dataframe): | |||
yield | |||
|
|||
|
|||
@contextmanager | |||
def open_telemetry_udf_context_manager(func, parameters): |
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 using parameters pattern rather than passing the individual parameters?
stage_location, | ||
parallel, | ||
) | ||
parameters = {"handler": handler, "name": name} |
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.
Can use named arguments, I think it is better than creating a new dict and search in it.
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-1341730
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Please write a short description of how your code change solves the related issue.