Highlights
Advanced Metrics Support
The Rust core that the .NET SDK uses has always provided metrics and a way to export via OpenTelemetry or Prometheus. This release improves the exposure of these metrics in few ways:
First, a MetricMeter property has been added to TemporalRuntime, ActivityExecutionContext, and Workflow for those wanting to record their own metrics using the core-based metrics (but it is often still more desirable to use one's own metrics implementation). The Workflow.MetricMeter has logic to ignore metrics recorded inside workflows.
Second, a Temporal runtime is the overall object created to power Temporal features (if not using the default) and its MetricOptions now have a CustomMetricMeter which accepts a ICustomMetricMeter implementation. If set, this interface will be used for all core-based metrics.
Finally a new extension project, Temporalio.Extensions.DiagnosticSource, has been created which contains an ICustomMetricMeter implementation that sends core metrics to an underlying System.Diagnostics.Metrics.Meter implementation. So with this extension, users can have all internal SDK metrics flow through traditional .NET metrics utilities, even though they originate in Temporal's Rust core.
Several Minor Additions
Added
Workflow.CurrentHistoryLength,Workflow.CurrentHistorySize, andWorkflow.ContinueAsNewSuggestedto help developers understand history sizes and when to continue as newAdded
WorkflowInfo.LastFailureandWorkflowInfo.LastResultfor use by workflow retrying and schedulesAdded
TemporalConnectionOptions.KeepAliveto support client keep alive, and defaulted it to 30s interval with 15s timeoutAdded
WorkflowOptions.StartDelayto add a delay to the start of a workflowAdded experimental support for workflow update, which is only available in bleeding edge open source server environments
💥 BREAKING CHANGES
Only a couple of barely visible, rarely used things were changed this release:
Static methods on for creating activity definitions
Temporalio.Activities.ActivityDefinitionremoved
cacheboolean parameter since caching of activity definitions is no longer that valuable (#118)Removed
Temporalio.Runtime.TelemetryOptions.Tracingproperty and associated class since this was only for advanced internal support for core tracing (i.e. not related to actual Temporal/workflow tracing)