Documentation
¶
Overview ¶
Package otel provides OpenTelemetry integration for Romancy workflow hooks.
Index ¶
- type OTelHooks
- func (h *OTelHooks) OnActivityCacheHit(ctx context.Context, info hooks.ActivityCacheHitInfo)
- func (h *OTelHooks) OnActivityComplete(ctx context.Context, info hooks.ActivityCompleteInfo)
- func (h *OTelHooks) OnActivityFailed(ctx context.Context, info hooks.ActivityFailedInfo)
- func (h *OTelHooks) OnActivityRetry(ctx context.Context, info hooks.ActivityRetryInfo)
- func (h *OTelHooks) OnActivityStart(ctx context.Context, info hooks.ActivityStartInfo)
- func (h *OTelHooks) OnEventReceived(ctx context.Context, info hooks.EventReceivedInfo)
- func (h *OTelHooks) OnEventTimeout(ctx context.Context, info hooks.EventTimeoutInfo)
- func (h *OTelHooks) OnEventWaitComplete(ctx context.Context, info hooks.EventWaitCompleteInfo)
- func (h *OTelHooks) OnEventWaitStart(ctx context.Context, info hooks.EventWaitStartInfo)
- func (h *OTelHooks) OnReplayComplete(ctx context.Context, info hooks.ReplayCompleteInfo)
- func (h *OTelHooks) OnReplayStart(ctx context.Context, info hooks.ReplayStartInfo)
- func (h *OTelHooks) OnTimerFired(ctx context.Context, info hooks.TimerFiredInfo)
- func (h *OTelHooks) OnTimerStart(ctx context.Context, info hooks.TimerStartInfo)
- func (h *OTelHooks) OnWorkflowCancelled(ctx context.Context, info hooks.WorkflowCancelledInfo)
- func (h *OTelHooks) OnWorkflowComplete(ctx context.Context, info hooks.WorkflowCompleteInfo)
- func (h *OTelHooks) OnWorkflowFailed(ctx context.Context, info hooks.WorkflowFailedInfo)
- func (h *OTelHooks) OnWorkflowStart(ctx context.Context, info hooks.WorkflowStartInfo)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OTelHooks ¶
OTelHooks implements WorkflowHooks with OpenTelemetry tracing. It creates spans for workflow, activity, event, timer, and replay lifecycle events.
func NewOTelHooks ¶
func NewOTelHooks(tracerProvider trace.TracerProvider) *OTelHooks
NewOTelHooks creates a new OpenTelemetry hooks instance. If tracerProvider is nil, the global tracer provider is used.
func (*OTelHooks) OnActivityCacheHit ¶
func (h *OTelHooks) OnActivityCacheHit(ctx context.Context, info hooks.ActivityCacheHitInfo)
OnActivityCacheHit records a cache hit event during replay.
func (*OTelHooks) OnActivityComplete ¶
func (h *OTelHooks) OnActivityComplete(ctx context.Context, info hooks.ActivityCompleteInfo)
OnActivityComplete ends the activity span with success status.
func (*OTelHooks) OnActivityFailed ¶
func (h *OTelHooks) OnActivityFailed(ctx context.Context, info hooks.ActivityFailedInfo)
OnActivityFailed ends the activity span with error status.
func (*OTelHooks) OnActivityRetry ¶
func (h *OTelHooks) OnActivityRetry(ctx context.Context, info hooks.ActivityRetryInfo)
OnActivityRetry records a retry event on the activity span.
func (*OTelHooks) OnActivityStart ¶
func (h *OTelHooks) OnActivityStart(ctx context.Context, info hooks.ActivityStartInfo)
OnActivityStart creates a new span when an activity starts. The activity span is created as a child of the workflow span.
func (*OTelHooks) OnEventReceived ¶
func (h *OTelHooks) OnEventReceived(ctx context.Context, info hooks.EventReceivedInfo)
OnEventReceived creates a span for a received event.
func (*OTelHooks) OnEventTimeout ¶
func (h *OTelHooks) OnEventTimeout(ctx context.Context, info hooks.EventTimeoutInfo)
OnEventTimeout ends the event wait span with timeout status.
func (*OTelHooks) OnEventWaitComplete ¶
func (h *OTelHooks) OnEventWaitComplete(ctx context.Context, info hooks.EventWaitCompleteInfo)
OnEventWaitComplete ends the event wait span with success status.
func (*OTelHooks) OnEventWaitStart ¶
func (h *OTelHooks) OnEventWaitStart(ctx context.Context, info hooks.EventWaitStartInfo)
OnEventWaitStart creates a span when waiting for an event starts.
func (*OTelHooks) OnReplayComplete ¶
func (h *OTelHooks) OnReplayComplete(ctx context.Context, info hooks.ReplayCompleteInfo)
OnReplayComplete ends the replay span with success status.
func (*OTelHooks) OnReplayStart ¶
func (h *OTelHooks) OnReplayStart(ctx context.Context, info hooks.ReplayStartInfo)
OnReplayStart creates a span when replay starts.
func (*OTelHooks) OnTimerFired ¶
func (h *OTelHooks) OnTimerFired(ctx context.Context, info hooks.TimerFiredInfo)
OnTimerFired ends the timer span when the timer fires.
func (*OTelHooks) OnTimerStart ¶
func (h *OTelHooks) OnTimerStart(ctx context.Context, info hooks.TimerStartInfo)
OnTimerStart creates a span when a timer starts.
func (*OTelHooks) OnWorkflowCancelled ¶
func (h *OTelHooks) OnWorkflowCancelled(ctx context.Context, info hooks.WorkflowCancelledInfo)
OnWorkflowCancelled ends the workflow span with cancellation status.
func (*OTelHooks) OnWorkflowComplete ¶
func (h *OTelHooks) OnWorkflowComplete(ctx context.Context, info hooks.WorkflowCompleteInfo)
OnWorkflowComplete ends the workflow span with success status.
func (*OTelHooks) OnWorkflowFailed ¶
func (h *OTelHooks) OnWorkflowFailed(ctx context.Context, info hooks.WorkflowFailedInfo)
OnWorkflowFailed ends the workflow span with error status.
func (*OTelHooks) OnWorkflowStart ¶
func (h *OTelHooks) OnWorkflowStart(ctx context.Context, info hooks.WorkflowStartInfo)
OnWorkflowStart creates a new span when a workflow starts.