helpers

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionListSummary

func ActionListSummary(actions []*protos.WorkflowAction) string

func ContextFromTraceContext

func ContextFromTraceContext(ctx context.Context, tc *protos.TraceContext) (context.Context, error)

func FromRuntimeStatusString

func FromRuntimeStatusString(status string) protos.OrchestrationStatus

func GenerateChildWorkflowInstanceID

func GenerateChildWorkflowInstanceID(parentInstanceID string, actionID int32) string

GenerateChildWorkflowInstanceID generates a deterministic instance ID for a child workflow based on the parent instance ID and the action's sequence number.

func GenerateChildWorkflowInstanceIDForExecution added in v1.2.1

func GenerateChildWorkflowInstanceIDForExecution(parentInstanceID, executionID string, actionID int32) string

GenerateChildWorkflowInstanceIDForExecution includes the complete action ID and execution identity. The original helper remains available for legacy IDs.

func GetDefaultWorkerName

func GetDefaultWorkerName() string

func GetTaskFunctionName

func GetTaskFunctionName(f any) string

func GetTaskId

func GetTaskId(e *protos.HistoryEvent) int32

func HistoryListSummary

func HistoryListSummary(list []*protos.HistoryEvent) string

func NewRootTraceContext

func NewRootTraceContext() *protos.TraceContext

NewRootTraceContext returns a fresh W3C TraceContext with a randomly generated trace ID and span ID and the sampled flag set. It is intended for cases where a new root trace should be started explicitly, such as each generation of a ContinueAsNew workflow (dapr/dapr#10064): copying the previous generation's ParentTraceContext caused every generation to re-parent off the original trace and produced unbounded traces.

func NoopSpan

func NoopSpan() trace.Span

func SpanContextFromTraceContext

func SpanContextFromTraceContext(tc *protos.TraceContext) (trace.SpanContext, error)

func StartAndEndNewTimerSpan

func StartAndEndNewTimerSpan(ctx context.Context, tf *protos.TimerFiredEvent, createdTime time.Time, instanceID string) error

func StartNewActivitySpan

func StartNewActivitySpan(
	ctx context.Context, name string, version string, instanceID string, taskID int32,
) (context.Context, trace.Span)

func StartNewCreateWorkflowSpan

func StartNewCreateWorkflowSpan(
	ctx context.Context, name string, version string, instanceID string,
) (context.Context, trace.Span)

func StartNewRunWorkflowSpan

func StartNewRunWorkflowSpan(
	ctx context.Context, es *protos.ExecutionStartedEvent, startedTime time.Time,
) (context.Context, trace.Span)

func ToRuntimeStatusString

func ToRuntimeStatusString(status protos.OrchestrationStatus) string

func TraceContextFromSpan

func TraceContextFromSpan(span trace.Span) *protos.TraceContext

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL