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 tiger.current_serialized_func #296

Merged
merged 1 commit into from
Aug 24, 2023
Merged

add tiger.current_serialized_func #296

merged 1 commit into from
Aug 24, 2023

Conversation

nsaje
Copy link
Contributor

@nsaje nsaje commented Aug 24, 2023

Adds a current_serialized_func property to the tiger object.

This is useful for instrumentation - the current_serialized_func can be used for naming spans or labeling metrics.

Without it one would have to do e.g.

try:
    return tiger.current_task.serialized_func
except RuntimeError:
    return tiger.current_tasks[0].serialized_func

because we don't expose current_task_is_batch either.

@nsaje nsaje requested a review from thomasst August 24, 2023 08:46
Copy link
Member

@thomasst thomasst left a comment

Choose a reason for hiding this comment

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

I guess we could expose current_task_is_batch also if needed.

@nsaje nsaje merged commit 2a7e90f into master Aug 24, 2023
72 checks passed
@nsaje nsaje deleted the current_serialized_func branch August 24, 2023 09:19
@nsaje nsaje mentioned this pull request Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants