Documentation
¶
Index ¶
- Constants
- func BuildErrorAttributes(err error) []workflowobservability.Attribute
- func ContextWithTelemetry(ctx context.Context, telemetry *Context) context.Context
- func ErrorAttributes(err error) []workflowobservability.Attribute
- func SerializedAttribute(key string, value any) workflowobservability.Attribute
- func SetBuildWorkflowAttributes(span *Activity, metadata WorkflowMetadata, definition any)
- type Activity
- func (s *Activity) AddErrorEvent(name string, err error)
- func (s *Activity) AddEvent(name string, attrs ...workflowobservability.Attribute)
- func (s *Activity) CaptureError(err error)
- func (s *Activity) End()
- func (s *Activity) SetAttributes(attrs ...workflowobservability.Attribute)
- func (s *Activity) SetDeliveryStatus(status DeliveryStatus)
- type Context
- func (c *Context) ExtractTraceContext(ctx context.Context) map[string]string
- func (c *Context) IsEnabled() bool
- func (c *Context) SetExecutorOutput(span *Activity, output any)
- func (c *Context) StartEdgeGroupProcess(ctx context.Context, metadata EdgeGroupMetadata) (context.Context, *Activity)
- func (c *Context) StartExecutorProcess(ctx context.Context, executorID, executorType, messageType string, message any, ...) (context.Context, *Activity)
- func (c *Context) StartMessageSend(ctx context.Context, sourceID, targetID string, message any) (context.Context, *Activity)
- func (c *Context) StartWorkflowBuild(ctx context.Context) (context.Context, *Activity)
- func (c *Context) StartWorkflowRun(ctx context.Context, metadata WorkflowMetadata) (context.Context, *Activity)
- func (c *Context) StartWorkflowSession(ctx context.Context, metadata WorkflowMetadata) (context.Context, *Activity)
- type DeliveryStatus
- type EdgeGroupMetadata
- type Options
- type WorkflowMetadata
Constants ¶
View Source
const ( ActivityWorkflowBuild = "workflow.build" ActivityWorkflowSession = "workflow.session" ActivityWorkflowInvoke = "workflow_invoke" ActivityMessageSend = "message.send" ActivityExecutorProcess = "executor.process" ActivityEdgeGroupProcess = "edge_group.process" EventBuildStarted = "build.started" EventBuildValidationCompleted = "build.validation_completed" EventBuildCompleted = "build.completed" EventBuildError = "build.error" EventSessionStarted = "session.started" EventSessionCompleted = "session.completed" EventSessionError = "session.error" EventWorkflowStarted = "workflow.started" EventWorkflowCompleted = "workflow.completed" EventWorkflowError = "workflow.error" TagWorkflowID = "workflow.id" TagWorkflowName = "workflow.name" TagWorkflowDescription = "workflow.description" TagWorkflowDefinition = "workflow.definition" TagBuildErrorMessage = "build.error.message" TagBuildErrorType = "build.error.type" TagErrorType = "error.type" TagErrorMessage = "error.message" TagSessionID = "session.id" TagExecutorID = "executor.id" TagExecutorType = "executor.type" TagExecutorInput = "executor.input" TagExecutorOutput = "executor.output" TagMessageType = "message.type" TagMessageContent = "message.content" TagEdgeGroupType = "edge_group.type" TagMessageSourceID = "message.source_id" TagMessageTargetID = "message.target_id" TagEdgeGroupDelivered = "edge_group.delivered" TagEdgeGroupDeliveryStatus = "edge_group.delivery_status" )
Variables ¶
This section is empty.
Functions ¶
func BuildErrorAttributes ¶
func BuildErrorAttributes(err error) []workflowobservability.Attribute
func ContextWithTelemetry ¶
func ErrorAttributes ¶
func ErrorAttributes(err error) []workflowobservability.Attribute
func SerializedAttribute ¶
func SerializedAttribute(key string, value any) workflowobservability.Attribute
func SetBuildWorkflowAttributes ¶
func SetBuildWorkflowAttributes(span *Activity, metadata WorkflowMetadata, definition any)
Types ¶
type Activity ¶
type Activity struct {
// contains filtered or unexported fields
}
func (*Activity) AddErrorEvent ¶
func (*Activity) AddEvent ¶
func (s *Activity) AddEvent(name string, attrs ...workflowobservability.Attribute)
func (*Activity) CaptureError ¶
func (*Activity) SetAttributes ¶
func (s *Activity) SetAttributes(attrs ...workflowobservability.Attribute)
func (*Activity) SetDeliveryStatus ¶
func (s *Activity) SetDeliveryStatus(status DeliveryStatus)
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func FromContext ¶
func (*Context) ExtractTraceContext ¶
func (*Context) SetExecutorOutput ¶
func (*Context) StartEdgeGroupProcess ¶
func (*Context) StartExecutorProcess ¶
func (*Context) StartMessageSend ¶
func (*Context) StartWorkflowBuild ¶
func (*Context) StartWorkflowRun ¶
func (*Context) StartWorkflowSession ¶
type DeliveryStatus ¶
type DeliveryStatus string
const ( DeliveryStatusDelivered DeliveryStatus = "delivered" DeliveryStatusDroppedTypeMismatch DeliveryStatus = "dropped type mismatch" DeliveryStatusDroppedTargetMismatch DeliveryStatus = "dropped target mismatch" DeliveryStatusDroppedConditionFalse DeliveryStatus = "dropped condition false" DeliveryStatusException DeliveryStatus = "exception" DeliveryStatusBuffered DeliveryStatus = "buffered" )
type EdgeGroupMetadata ¶
type Options ¶
type Options struct {
Tracer workflowobservability.Tracer
// EnableSensitiveData includes serialized message inputs, outputs, and
// message contents in span attributes. It is disabled by default.
EnableSensitiveData bool
DisableWorkflowBuild bool
DisableWorkflowRun bool
DisableExecutorProcess bool
DisableEdgeGroupProcess bool
DisableMessageSend bool
}
Click to show internal directories.
Click to hide internal directories.