-
Notifications
You must be signed in to change notification settings - Fork 141
💥 Nexus MetricMeter Support #1233
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
Conversation
…rics test to properly assert both counter updates
…ith time skipping
| nexus_context: _OperationCtxT | ||
| """Nexus-specific start operation context.""" | ||
|
|
||
| runtime_metric_meter: temporalio.common.MetricMeter |
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 seems easy to mess up to me. If I'm just looking at the context, it seems easy to grab this one
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 went ahead and changed it from runtime_metric_meter to _runtime_metric_meter to help guide toward using metric_meter
tconley1428
left a comment
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.
Call out in the description what the breaking portion is.
…time_metric_meter private to help avoid confusion
What was changed
MetricMeterinside Nexus operation handlers.concurrent.futures.Executortoconcurrent.futures.ThreadPoolExecutor. This is a breaking change.Why?
To enable users to create metrics in Nexus operations in the same way as Activities.
The type of executor was narrowed to prevent users from running into known issues around pickleability. Additionally, handling Nexus operation start/cancel requests are intended to be short and aren't a great fit for something like a
ProcessPoolExecutor.Checklist
How was this tested:
New tests were added to include execution of Nexus operations via the async event loop and a
ThreadPoolExecutorand verify that metrics are sent. The new tests mirror the existing workflow metrics tests, but are skipped in the time skipping environment due to lack of Nexus support.