Documentation
¶
Index ¶
- type ConfigureSentryScopeFunc
- type FilterActivityErrorFunc
- type FilterActivityPanicFunc
- type FilterWorkflowErrorFunc
- type FilterWorkflowPanicFunc
- type Option
- func WithConfigureSentryScope(configureSentryScope ConfigureSentryScopeFunc) Option
- func WithFilterActivityError(filterActivityError FilterActivityErrorFunc) Option
- func WithFilterActivityPanic(filterActivityPanic FilterActivityPanicFunc) Option
- func WithFilterWorkflowError(filterWorkflowError FilterWorkflowErrorFunc) Option
- func WithFilterWorkflowPanic(filterWorkflowPanic FilterWorkflowPanicFunc) Option
- func WithWorkflowErrorActivityOptions(workflowErrorActivityOptions workflow.LocalActivityOptions) Option
- func WithWorkflowPanicActivityOptions(workflowPanicActivityOptions workflow.LocalActivityOptions) Option
- type ReportErrorInput
- type ReportPanicInput
- type TemporalActivityInterceptor
- type TemporalWorkerInterceptor
- func (s TemporalWorkerInterceptor) InterceptActivity(_ context.Context, next interceptor.ActivityInboundInterceptor) interceptor.ActivityInboundInterceptor
- func (s TemporalWorkerInterceptor) InterceptWorkflow(_ workflow.Context, next interceptor.WorkflowInboundInterceptor) interceptor.WorkflowInboundInterceptor
- type TemporalWorkflowInterceptor
- func (s *TemporalWorkflowInterceptor) ExecuteUpdate(ctx workflow.Context, in *interceptor.UpdateInput) (any, error)
- func (s *TemporalWorkflowInterceptor) ExecuteWorkflow(ctx workflow.Context, in *interceptor.ExecuteWorkflowInput) (any, error)
- func (s *TemporalWorkflowInterceptor) HandleQuery(ctx workflow.Context, in *interceptor.HandleQueryInput) (any, error)
- func (s *TemporalWorkflowInterceptor) HandleSignal(ctx workflow.Context, in *interceptor.HandleSignalInput) error
- func (s *TemporalWorkflowInterceptor) ValidateUpdate(ctx workflow.Context, in *interceptor.UpdateInput) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigureSentryScopeFunc ¶
type ConfigureSentryScopeFunc = func( ctx context.Context, request []any, eventName string, activityInfo *activity.Info, workflowInfo *workflow.Info, ) func(scope *sentry.Scope)
ConfigureSentryScopeFunc defines a function to configure Sentry scope with context and request data.
type FilterActivityErrorFunc ¶
FilterActivityErrorFunc defines a function to filter activity errors before reporting to Sentry.
type FilterActivityPanicFunc ¶
FilterActivityPanicFunc defines a function to filter activity panics before reporting to Sentry.
type FilterWorkflowErrorFunc ¶
FilterWorkflowErrorFunc defines a function to filter workflow errors before reporting to Sentry.
type FilterWorkflowPanicFunc ¶
FilterWorkflowPanicFunc defines a function to filter workflow panics before reporting to Sentry.
type Option ¶
type Option = func(*options)
Option defines a configuration option for the interceptor.
func WithConfigureSentryScope ¶
func WithConfigureSentryScope(configureSentryScope ConfigureSentryScopeFunc) Option
WithConfigureSentryScope sets a custom function to configure Sentry scope.
func WithFilterActivityError ¶
func WithFilterActivityError(filterActivityError FilterActivityErrorFunc) Option
WithFilterActivityError sets a filter function for activity errors.
func WithFilterActivityPanic ¶
func WithFilterActivityPanic(filterActivityPanic FilterActivityPanicFunc) Option
WithFilterActivityPanic sets a filter function for activity panics.
func WithFilterWorkflowError ¶
func WithFilterWorkflowError(filterWorkflowError FilterWorkflowErrorFunc) Option
WithFilterWorkflowError sets a filter function for workflow errors.
func WithFilterWorkflowPanic ¶
func WithFilterWorkflowPanic(filterWorkflowPanic FilterWorkflowPanicFunc) Option
WithFilterWorkflowPanic sets a filter function for workflow panics.
func WithWorkflowErrorActivityOptions ¶
func WithWorkflowErrorActivityOptions(workflowErrorActivityOptions workflow.LocalActivityOptions) Option
WithWorkflowErrorActivityOptions sets custom activity options for error reporting.
func WithWorkflowPanicActivityOptions ¶
func WithWorkflowPanicActivityOptions(workflowPanicActivityOptions workflow.LocalActivityOptions) Option
WithWorkflowPanicActivityOptions sets custom activity options for panic reporting.
type ReportErrorInput ¶
type ReportErrorInput struct {
Error error
EventName string
Request []any
ActivityInfo *activity.Info
WorkflowInfo *workflow.Info
}
ReportErrorInput contains data needed to report an error to Sentry.
type ReportPanicInput ¶
type ReportPanicInput struct {
Panic any
EventName string
Request []any
ActivityInfo *activity.Info
WorkflowInfo *workflow.Info
}
ReportPanicInput contains data needed to report a panic to Sentry.
type TemporalActivityInterceptor ¶
type TemporalActivityInterceptor struct {
interceptor.ActivityInboundInterceptorBase
// contains filtered or unexported fields
}
TemporalActivityInterceptor provides Sentry error and panic reporting for Temporal activity executions.
func (*TemporalActivityInterceptor) ExecuteActivity ¶
func (s *TemporalActivityInterceptor) ExecuteActivity( ctx context.Context, in *interceptor.ExecuteActivityInput, ) (any, error)
ExecuteActivity intercepts activity execution and reports errors/panics to Sentry.
type TemporalWorkerInterceptor ¶
type TemporalWorkerInterceptor struct {
*interceptor.WorkerInterceptorBase
// contains filtered or unexported fields
}
TemporalWorkerInterceptor provides Sentry error and panic reporting for Temporal workflows and activities.
func New ¶
func New(opts ...Option) *TemporalWorkerInterceptor
New creates a new TemporalWorkerInterceptor with the provided options.
Note: This interceptor uses local activities for error reporting which must complete within the workflow task timeout (default 10s). The default timeout is 5s to provide a safety margin. Learn more about local activities vs activities here: https://community.temporal.io/t/local-activity-vs-activity/290/3.
func (TemporalWorkerInterceptor) InterceptActivity ¶
func (s TemporalWorkerInterceptor) InterceptActivity( _ context.Context, next interceptor.ActivityInboundInterceptor, ) interceptor.ActivityInboundInterceptor
InterceptActivity creates and returns an activity interceptor with Sentry integration.
func (TemporalWorkerInterceptor) InterceptWorkflow ¶
func (s TemporalWorkerInterceptor) InterceptWorkflow( _ workflow.Context, next interceptor.WorkflowInboundInterceptor, ) interceptor.WorkflowInboundInterceptor
InterceptWorkflow creates and returns a workflow interceptor with Sentry integration.
type TemporalWorkflowInterceptor ¶
type TemporalWorkflowInterceptor struct {
interceptor.WorkflowInboundInterceptorBase
// contains filtered or unexported fields
}
TemporalWorkflowInterceptor provides Sentry error and panic reporting for Temporal workflow executions.
func (*TemporalWorkflowInterceptor) ExecuteUpdate ¶
func (s *TemporalWorkflowInterceptor) ExecuteUpdate(ctx workflow.Context, in *interceptor.UpdateInput) (any, error)
ExecuteUpdate intercepts update execution and reports errors/panics to Sentry.
func (*TemporalWorkflowInterceptor) ExecuteWorkflow ¶
func (s *TemporalWorkflowInterceptor) ExecuteWorkflow( ctx workflow.Context, in *interceptor.ExecuteWorkflowInput, ) (any, error)
ExecuteWorkflow intercepts workflow execution and reports errors/panics to Sentry.
func (*TemporalWorkflowInterceptor) HandleQuery ¶
func (s *TemporalWorkflowInterceptor) HandleQuery(ctx workflow.Context, in *interceptor.HandleQueryInput) (any, error)
HandleQuery intercepts query handling and reports errors/panics to Sentry.
func (*TemporalWorkflowInterceptor) HandleSignal ¶
func (s *TemporalWorkflowInterceptor) HandleSignal(ctx workflow.Context, in *interceptor.HandleSignalInput) error
HandleSignal intercepts signal handling and reports errors/panics to Sentry.
func (*TemporalWorkflowInterceptor) ValidateUpdate ¶
func (s *TemporalWorkflowInterceptor) ValidateUpdate(ctx workflow.Context, in *interceptor.UpdateInput) error
ValidateUpdate intercepts update validation and reports errors/panics to Sentry.
