[Feature Request] Support unsafe tracing event disabling in workflows
cretz opened this issue · comments
Chad Retz commented
Describe the solution you'd like
using (Workflow.Unsafe.TracingEventsDisabled())
{
// code
}
Chad Retz commented
After further discussion, this would be better as a property that can be set
Chad Retz commented
The use case for this was to support running arbitrary non-workflow async calls in workflow interceptors. However, this is trickier than it seems. If you await
it may use the current task scheduler. We have found a way to do this by creating a task on the default scheduler and explicitly Wait
ing on it, but it's even harder to get back on the workflow scheduler if you want that.
I am closing this since the solution presented (disabling this inside a workflow) does not solve the actual problem of running outside the workflow scheduler. I can reopen if we do want to revisit this.