Highlights

Experimental Workflow Failure Type Customization

When a workflow raises an exception that wasn't ApplicationFailureExceptionor bubbled from a Temporal call (e.g. activity failure), it would be a "task failure" which puts the workflow in a suspended state retrying the task until a code fix is deployed. An experimental feature is now available that lets users set which exception types should instead fail the workflow instead of suspending it. Users can now set the per-workflow FailureExceptionTypeson the [Workflow]attribute or set the worker-level WorkflowFailureExceptionTypesoption when creating the TemporalWorker. If an exception extends from one of these when raised, it will fail the workflow when raised.

Worker Client Replacement

Workers can now have the client they use replaced without shutting down the worker. The Clientproperty on the TemporalWorkercan be set to a different connected client. This is useful for users that need to change options like mTLS client certificate without worker downtime. The worker will not interrupt any polling calls but will start using the new client for subsequent calls.

API Key Client Option

If you use API keys in your Temporal server (i.e. Bearertokens on Authorizationheaders), you can now set ApiKeyoption when connecting a TemporalClient/TemporalConnection or set the ApiKeyproperty on an existing connection to update it.

Floats and Durations in Metrics

Users using MetricMeterdirectly to create metrics (off of runtime, activity, or workflow) can now create float-based histograms and gauges, and duration-based histograms. Similarly users using ICustomMetricMeterto retrieve metrics can say how they want to retrieve durations (float seconds, int milliseconds, or TimeSpan). A UseSecondsForDurationoption was added to telemetry options for users that prefer seconds as float-based durations to OpenTelemetry and Prometheus instead of the default of integer milliseconds.

💥 This has a minor compatibility break. For users that implemented ICustomMetricMeter, calls on that interface can now start passing in doubleand TimeSpanwhere it didn't before, but only if users start using those types of metrics.

Counting Workflows

A new CountWorkflowsAsynccall has been added to the ITemporalClientthat takes the same query as ListWorkflowsAsyncbut is optimized just to perform counts.

Specific Changes

2024-01-05 - 0e592ee - Fix issue with DI-based static async activities (#172) 2024-01-10 - 53a8a3d - Properly ignore unknown fields when parsing history JSON (#175) 2024-01-12 - 7127437 - Add build id to workflow context (#174) 2024-01-19 - ba4763b - Fix issue with Rust cache using newer node version (#177) 2024-02-01 - 79104b6 - Prefix some errors with rule identifiers (#180) 2024-02-12 - bfe4b3a - Doc/README updates (#188) 2024-02-27 - 66abe70 - Update core (#192) 2024-02-28 - c703da9 - Add type-safe SignalWithStart (#193) 2024-03-01 - e99bcb0 - Eager workflow start (#195) 2024-03-07 - 666ab45 - Fix issue with unconfigured metric meter (#202) 2024-03-07 - ce3f195 - Worker poller and ratio options (#200) 2024-03-08 - 070fba5 - Use Debugger.IsAttached to affect default for debug mode (#201) 2024-03-12 - 3faaf2b - Client API key (#203) 2024-03-21 - 67a52ff - Ability for certain task failure types to fail workflow (#205) 2024-03-21 - d2be959 - Add Client.CountWorkflowsAsync (#206) 2024-03-26 - c6b7aca - Alternative CreateTemporalActivityDefinition (#207) 2024-03-29 - 7d37b9d - Fix README snippet (#213) 2024-04-02 - 070faac - Remove experimental flag from StartDelay (#208) 2024-04-16 - 740dfa2 - Use build ID in the unique DI identifier for workers (#216) 2024-04-19 - 1573d3a - Support duration and float metrics (#223) 2024-04-21 - e11dfd5 - Correct xmldoc spelling error on WorkflowAttribute (#227) 2024-04-22 - 899672c - Make ctor for DefaultPayloadConverterpublic to expose JsonSerializerOptions(#226) 2024-04-24 - 2bd9ed3 - Readme updates (#230) 2024-04-25 - 9c1c127 - Use macos-12 GHA runners instead of macos-latest (#232) 2024-04-26 - f1b8dde - Support macOS ARM + macOS Intel and update proto generation (#233) 2024-05-06 - e771d5b - Worker client replacement (#236)