workflow_completed metric counter is expected to count newly completed executions.
Actual Behavior
workflow_completed counter counts successful completion of workflow methods, including replays for example.
Additional Context
The same problem is present for workflow_continue_as_new counter and workflow_failed.
Proposed solution
A worker should log these metrics only after reporting the completion of the workflow task to the server and getting a confirmation from the server that the completion was not rejected.
Expected Behavior
workflow_completed
metric counter is expected to count newly completed executions.Actual Behavior
workflow_completed counter counts successful completion of workflow methods, including replays for example.
Additional Context
The same problem is present for
workflow_continue_as_new
counter andworkflow_failed
.Proposed solution
A worker should log these metrics only after reporting the completion of the workflow task to the server and getting a confirmation from the server that the completion was not rejected.