temporalio / sdk-java

Temporal Java SDK
https://temporal.io
Apache License 2.0
209 stars 142 forks source link

Java SDK is not reporting workflow_failures from the code path via the FailWorkflowExceptionTypes #2103

Closed jlacefie closed 2 months ago

jlacefie commented 3 months ago

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

Quinn-With-Two-Ns commented 3 months ago

Related to https://github.com/temporalio/sdk-java/issues/1590

Quinn-With-Two-Ns commented 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.