temporal icon indicating copy to clipboard operation
temporal copied to clipboard

Fix schedule_action_delay metric for buffered actions

Open dnr opened this issue 1 year ago • 0 comments

What changed?

  • Calculate "delay" for buffered actions from previous action close.
  • Update a few logs.

Why?

If an action is held up by waiting for a previous action to finish (e.g. BufferOne, BufferAll, CancelOther overlap policies), it's not fair to count the waiting time as the "delay" for that action.

How did you test it?

Tested locally by building up a backlog and checking that the metric didn't increase (and did before this change). Also tested upgrade and downgrade.

Potential risks

This is touching workflow code, but is compatible because:

  • If it sees nil for the close time or desired time, that's fine, it just falls back to actual time.
  • All the behavior changes are in logs and metrics only.

dnr avatar May 09 '24 00:05 dnr