Closed jlacefie closed 2 months ago
Investigating this more the Java SDK does report workflow_failures
correctly if the exception is throw in the user workflow code. The miss is when the exception is thrown by the SDK itself, which is often where NonDeterministicException
are thrown.
Expected Behavior
Workflow Failed Cloud Metrics and Java SDK Metrics should "closely" match each other
Actual Behavior
Workflow Failed metrics differ between Temporal Cloud and SDK metrics.
Steps to Reproduce the Problem
The only place that SDK reports workflow_failures is from: https://github.com/temporalio/sdk-java/blob/v1.23.2/temporal-sdk/src/main/java/io/temporal/internal/replay/ReplayWorkflowExecutor.java#L97, which is not reachable when a workflow fails with WorkflowExecutionException from here: https://github.com/temporalio/sdk-java/blob/v1.23.2/temporal-sdk/src/main/java/io/temporal/internal/replay/ReplayWorkflowRunTaskHandler.java#L2[…]60
Specifications