logging

package
v0.3.15 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// HistoryBuilder events
	InvalidHistoryActionEventID = 1000

	// History Engine events
	HistoryEngineStarting              = 2000
	HistoryEngineStarted               = 2001
	HistoryEngineShuttingDown          = 2002
	HistoryEngineShutdown              = 2003
	PersistentStoreErrorEventID        = 2010
	HistorySerializationErrorEventID   = 2020
	HistoryDeserializationErrorEventID = 2021
	DuplicateTaskEventID               = 2030
	MultipleCompletionDecisionsEventID = 2040
	DuplicateTransferTaskEventID       = 2050
	DecisionFailedEventID              = 2060

	// Transfer Queue Processor events
	TransferQueueProcessorStarting         = 2100
	TransferQueueProcessorStarted          = 2101
	TransferQueueProcessorShuttingDown     = 2102
	TransferQueueProcessorShutdown         = 2103
	TransferQueueProcessorShutdownTimedout = 2104
	TransferTaskProcessingFailed           = 2105

	// Shard context events
	ShardRangeUpdatedEventID = 3000

	// ShardController events
	ShardControllerStarted          = 4000
	ShardControllerShutdown         = 4001
	ShardControllerShuttingDown     = 4002
	ShardControllerShutdownTimedout = 4003
	RingMembershipChangedEvent      = 4004
	ShardClosedEvent                = 4005
	ShardItemCreated                = 4010
	ShardItemRemoved                = 4011
	ShardEngineCreating             = 4020
	ShardEngineCreated              = 4021
	ShardEngineStopping             = 4022
	ShardEngineStopped              = 4023

	// MutableSateBuilder events
	InvalidMutableStateActionEventID = 4100

	// Matching Engine events
	TaskListLoading       = 5000
	TaskListLoaded        = 5001
	TaskListUnloading     = 5002
	TaskListUnloaded      = 5003
	TaskListLoadingFailed = 5004

	// Query task events
	InvalidQueryTaskEventID = 6000
	QueryTaskFailedEventID  = 6001

	// Worker Service Events
	ReplicationTaskProcessorStarting         = 7100
	ReplicationTaskProcessorStarted          = 7101
	ReplicationTaskProcessorStartFailed      = 7102
	ReplicationTaskProcessorShuttingDown     = 7103
	ReplicationTaskProcessorShutdown         = 7104
	ReplicationTaskProcessorShutdownTimedout = 7105
	ReplicationTaskProcessingFailed          = 7106

	// General purpose events
	OperationFailed   = 9000
	OperationPanic    = 9001
	OperationCritical = 9002
)

Events

View Source
const (
	// workflow logging tags
	TagWorkflowEventID      = "wf-event-id"
	TagWorkflowComponent    = "wf-component"
	TagWorkflowCluster      = "wf-cluster"
	TagWorkflowErr          = "wf-error"
	TagHistoryBuilderAction = "history-builder-action"
	TagStoreOperation       = "store-operation"
	TagDomainID             = "domain-id"
	TagWorkflowExecutionID  = "execution-id"
	TagWorkflowRunID        = "run-id"
	TagHistoryShardID       = "shard-id"
	TagDecisionType         = "decision-type"
	TagDecisionFailCause    = "decision-fail-cause"
	TagTaskID               = "task-id"
	TagTaskType             = "task-type"
	TagSourceCluster        = "source-cluster"
	TagPrevActiveCluster    = "prev-active-cluster"
	TagTopicName            = "topic-name"
	TagConsumerName         = "consumer-name"
	TagPartition            = "partition"
	TagPartitionKey         = "partition-key"
	TagOffset               = "offset"
	TagScope                = "scope"
	TagFailover             = "failover"
	TagVersion              = "version"
	TagCurrentVersion       = "current-version"
	TagIncomingVersion      = "incoming-version"
	TagFirstEventID         = "first-event-id"
	TagNextEventID          = "next-event-id"
	TagResetNextEventID     = "reset-next-event-id"
	TagTimeoutType          = "timeout-type"
	TagReplicationInfo      = "replication-info"
	TagAttemptCount         = "attempt-count"
	TagAttemptStart         = "attempt-start"
	TagAttemptEnd           = "attempt-end"

	// workflow logging tag values
	// TagWorkflowComponent Values
	TagValueHistoryBuilderComponent           = "history-builder"
	TagValueHistoryEngineComponent            = "history-engine"
	TagValueHistoryCacheComponent             = "history-cache"
	TagValueTransferQueueComponent            = "transfer-queue-processor"
	TagValueTimerQueueComponent               = "timer-queue-processor"
	TagValueReplicatorQueueComponent          = "replicator-queue-processor"
	TagValueShardController                   = "shard-controller"
	TagValueMatchingEngineComponent           = "matching-engine"
	TagValueReplicatorComponent               = "replicator"
	TagValueReplicationTaskProcessorComponent = "replication-task-processor"
	TagValueHistoryReplicatorComponent        = "history-replicator"

	// TagHistoryBuilderAction values
	TagValueActionWorkflowStarted                 = "add-workflowexecution-started-event"
	TagValueActionDecisionTaskScheduled           = "add-decisiontask-scheduled-event"
	TagValueActionDecisionTaskStarted             = "add-decisiontask-started-event"
	TagValueActionDecisionTaskCompleted           = "add-decisiontask-completed-event"
	TagValueActionDecisionTaskTimedOut            = "add-decisiontask-timedout-event"
	TagValueActionDecisionTaskFailed              = "add-decisiontask-failed-event"
	TagValueActionActivityTaskScheduled           = "add-activitytask-scheduled-event"
	TagValueActionActivityTaskStarted             = "add-activitytask-started-event"
	TagValueActionActivityTaskCompleted           = "add-activitytask-completed-event"
	TagValueActionActivityTaskFailed              = "add-activitytask-failed-event"
	TagValueActionActivityTaskTimedOut            = "add-activitytask-timed-event"
	TagValueActionActivityTaskCanceled            = "add-activitytask-canceled-event"
	TagValueActionActivityTaskCancelRequest       = "add-activitytask-cancel-request-event"
	TagValueActionActivityTaskCancelRequestFailed = "add-activitytask-cancel-request-failed-event"
	TagValueActionCompleteWorkflow                = "add-complete-workflow-event"
	TagValueActionFailWorkflow                    = "add-fail-workflow-event"
	TagValueActionTimeoutWorkflow                 = "add-timeout-workflow-event"
	TagValueActionCancelWorkflow                  = "add-cancel-workflow-event"
	TagValueActionTimerStarted                    = "add-timer-started-event"
	TagValueActionTimerFired                      = "add-timer-fired-event"
	TagValueActionTimerCanceled                   = "add-timer-Canceled-event"
	TagValueActionWorkflowTerminated              = "add-workflowexecution-terminated-event"
	TagValueActionWorkflowSignaled                = "add-workflowexecution-signaled-event"
	TagValueActionContinueAsNew                   = "add-continue-as-new-event"
	TagValueActionWorkflowCanceled                = "add-workflowexecution-canceled-event"
	TagValueActionChildExecutionStarted           = "add-childexecution-started-event"
	TagValueActionStartChildExecutionFailed       = "add-start-childexecution-failed-event"
	TagValueActionChildExecutionCompleted         = "add-childexecution-completed-event"
	TagValueActionChildExecutionFailed            = "add-childexecution-failed-event"
	TagValueActionChildExecutionCanceled          = "add-childexecution-canceled-event"
	TagValueActionChildExecutionTerminated        = "add-childexecution-terminated-event"
	TagValueActionChildExecutionTimedOut          = "add-childexecution-timedout-event"
	TagValueActionRequestCancelWorkflow           = "add-request-cancel-workflow-event"
	TagValueActionWorkflowCancelRequested         = "add-workflow-execution-cancel-requested-event"
	TagValueActionWorkflowCancelFailed            = "add-workflow-execution-cancel-failed-event"
	TagValueActionWorkflowSignalRequested         = "add-workflow-execution-signal-requested-event"
	TagValueActionWorkflowSignalFailed            = "add-workflow-execution-signal-failed-event"
	TagValueActionUnknownEvent                    = "add-unknown-event"

	// TagStoreOperation values
	TagValueStoreOperationGetTasks                = "get-tasks"
	TagValueStoreOperationCompleteTask            = "complete-task"
	TagValueStoreOperationCreateWorkflowExecution = "create-wf-execution"
	TagValueStoreOperationGetWorkflowExecution    = "get-wf-execution"
	TagValueStoreOperationUpdateWorkflowExecution = "update-wf-execution"
	TagValueStoreOperationDeleteWorkflowExecution = "delete-wf-execution"
	TagValueStoreOperationUpdateShard             = "update-shard"
	TagValueStoreOperationCreateTask              = "create-task"
	TagValueStoreOperationUpdateTaskList          = "update-task-list"
	TagValueStoreOperationStopTaskList            = "stop-task-list"

	// task list tags
	TagTaskListType = "task-list-type"
	TagTaskListName = "task-list-name"
)

Tags

View Source
const TagErr = `err`

TagErr is the tag for error object message

View Source
const TagHostname = "hostname"

TagHostname represents the hostname

Variables

This section is empty.

Functions

func LogCriticalErrorEvent added in v0.3.14

func LogCriticalErrorEvent(logger bark.Logger, msg string, err error)

LogCriticalErrorEvent is used to log critical errors by application it is expected to have alerts setup on such errors

func LogDecisionFailedEvent

func LogDecisionFailedEvent(lg bark.Logger, domainID, workflowID, runID string,
	failCause shared.DecisionTaskFailedCause)

LogDecisionFailedEvent is used to log decision failures by RespondDecisionTaskCompleted handler

func LogDecisionTimeoutLargerThanWorkflowTimeout added in v0.3.14

func LogDecisionTimeoutLargerThanWorkflowTimeout(logger bark.Logger, t int32, domain, wid, wfType string)

LogDecisionTimeoutLargerThanWorkflowTimeout is used to log warning msg for workflow that contains large decision timeout

func LogDecisionTimeoutTooLarge added in v0.3.14

func LogDecisionTimeoutTooLarge(logger bark.Logger, t int32, domain, wid, wfType string)

LogDecisionTimeoutTooLarge is used to log warning msg for workflow that contains large decision timeout

func LogDuplicateTaskEvent

func LogDuplicateTaskEvent(lg bark.Logger, taskType int, taskID int64, requestID string, scheduleID, startedID int64,
	isRunning bool)

LogDuplicateTaskEvent is used to log the event when a duplicate task is detected

func LogDuplicateTransferTaskEvent

func LogDuplicateTransferTaskEvent(lg bark.Logger, taskType int, taskID int64, scheduleID int64)

LogDuplicateTransferTaskEvent is used to log the event when duplicate processing of the same transfer task is detected

func LogHistoryDeserializationErrorEvent added in v0.3.3

func LogHistoryDeserializationErrorEvent(logger bark.Logger, err error, msg string)

LogHistoryDeserializationErrorEvent is used to log errors deserializing execution history

func LogHistoryEngineShutdownEvent

func LogHistoryEngineShutdownEvent(logger bark.Logger)

LogHistoryEngineShutdownEvent is used to log history shut down complete

func LogHistoryEngineShuttingDownEvent

func LogHistoryEngineShuttingDownEvent(logger bark.Logger)

LogHistoryEngineShuttingDownEvent is used to log history shutting down

func LogHistoryEngineStartedEvent

func LogHistoryEngineStartedEvent(logger bark.Logger)

LogHistoryEngineStartedEvent is used to log history engine started

func LogHistoryEngineStartingEvent

func LogHistoryEngineStartingEvent(logger bark.Logger)

LogHistoryEngineStartingEvent is used to log history engine starting

func LogHistorySerializationErrorEvent

func LogHistorySerializationErrorEvent(logger bark.Logger, err error, msg string)

LogHistorySerializationErrorEvent is used to log errors serializing execution history

func LogInternalServiceError added in v0.3.7

func LogInternalServiceError(logger bark.Logger, err error)

LogInternalServiceError is used to log internal service error

func LogInvalidHistoryActionEvent

func LogInvalidHistoryActionEvent(logger bark.Logger, action string, eventID int64, state string)

LogInvalidHistoryActionEvent is used to log invalid history builder state

func LogMultipleCompletionDecisionsEvent

func LogMultipleCompletionDecisionsEvent(lg bark.Logger, decisionType shared.DecisionType)

LogMultipleCompletionDecisionsEvent is used to log multiple completion decisions for an execution

func LogMutableStateInvalidAction

func LogMutableStateInvalidAction(logger bark.Logger, errorMsg string)

LogMutableStateInvalidAction is used to log invalid mutable state builder state

func LogOperationFailedEvent

func LogOperationFailedEvent(logger bark.Logger, msg string, err error)

LogOperationFailedEvent is used to log generic operation failures.

func LogOperationPanicEvent

func LogOperationPanicEvent(logger bark.Logger, msg string, err error)

LogOperationPanicEvent is used to log fatal errors by application to cause panic

func LogPersistantStoreErrorEvent

func LogPersistantStoreErrorEvent(logger bark.Logger, operation string, err error, details string)

LogPersistantStoreErrorEvent is used to log errors from persistence layer.

func LogQueryTaskFailedEvent added in v0.3.2

func LogQueryTaskFailedEvent(logger bark.Logger, domain, workflowID, runID, queryType string)

LogQueryTaskFailedEvent is used to log query task failure

func LogQueryTaskMissingWorkflowTypeErrorEvent added in v0.3.2

func LogQueryTaskMissingWorkflowTypeErrorEvent(logger bark.Logger, workflowID, runID, queryType string)

LogQueryTaskMissingWorkflowTypeErrorEvent is used to log invalid query task that is missing workflow type

func LogQueueProcesorShutdownEvent added in v0.3.11

func LogQueueProcesorShutdownEvent(logger bark.Logger)

LogQueueProcesorShutdownEvent is used to log transfer queue processor shutdown complete

func LogQueueProcesorShutdownTimedoutEvent added in v0.3.11

func LogQueueProcesorShutdownTimedoutEvent(logger bark.Logger)

LogQueueProcesorShutdownTimedoutEvent is used to log timeout during transfer queue processor shutdown

func LogQueueProcesorShuttingDownEvent added in v0.3.11

func LogQueueProcesorShuttingDownEvent(logger bark.Logger)

LogQueueProcesorShuttingDownEvent is used to log queue processor shutting down

func LogQueueProcesorStartedEvent added in v0.3.11

func LogQueueProcesorStartedEvent(logger bark.Logger)

LogQueueProcesorStartedEvent is used to log queue processor started

func LogQueueProcesorStartingEvent added in v0.3.11

func LogQueueProcesorStartingEvent(logger bark.Logger)

LogQueueProcesorStartingEvent is used to log queue processor starting

func LogReplicationTaskProcessorShutdownEvent added in v0.3.7

func LogReplicationTaskProcessorShutdownEvent(logger bark.Logger)

LogReplicationTaskProcessorShutdownEvent is used to log replication task processor shutdown complete

func LogReplicationTaskProcessorShutdownTimedoutEvent added in v0.3.7

func LogReplicationTaskProcessorShutdownTimedoutEvent(logger bark.Logger)

LogReplicationTaskProcessorShutdownTimedoutEvent is used to log timeout during replication task processor shutdown

func LogReplicationTaskProcessorShuttingDownEvent added in v0.3.7

func LogReplicationTaskProcessorShuttingDownEvent(logger bark.Logger)

LogReplicationTaskProcessorShuttingDownEvent is used to log replication task processing shutting down

func LogReplicationTaskProcessorStartFailedEvent added in v0.3.7

func LogReplicationTaskProcessorStartFailedEvent(logger bark.Logger, err error)

LogReplicationTaskProcessorStartFailedEvent is used to log replication task processor started

func LogReplicationTaskProcessorStartedEvent added in v0.3.7

func LogReplicationTaskProcessorStartedEvent(logger bark.Logger)

LogReplicationTaskProcessorStartedEvent is used to log replication task processor started

func LogReplicationTaskProcessorStartingEvent added in v0.3.7

func LogReplicationTaskProcessorStartingEvent(logger bark.Logger)

LogReplicationTaskProcessorStartingEvent is used to log replication task processor starting

func LogRingMembershipChangedEvent

func LogRingMembershipChangedEvent(logger bark.Logger, host string, added, removed, updated int)

LogRingMembershipChangedEvent is used to log membership changes events received by shard controller

func LogShardClosedEvent

func LogShardClosedEvent(logger bark.Logger, host string, shardID int)

LogShardClosedEvent is used to log shard closed event

func LogShardControllerShutdownEvent

func LogShardControllerShutdownEvent(logger bark.Logger, host string)

LogShardControllerShutdownEvent is used to log shard controller shutdown complete

func LogShardControllerShutdownTimedoutEvent

func LogShardControllerShutdownTimedoutEvent(logger bark.Logger, host string)

LogShardControllerShutdownTimedoutEvent is used to log timeout during shard controller shutdown

func LogShardControllerShuttingDownEvent

func LogShardControllerShuttingDownEvent(logger bark.Logger, host string)

LogShardControllerShuttingDownEvent is used to log shard controller shutting down

func LogShardControllerStartedEvent

func LogShardControllerStartedEvent(logger bark.Logger, host string)

LogShardControllerStartedEvent is used to log shard controller started

func LogShardEngineCreatedEvent

func LogShardEngineCreatedEvent(logger bark.Logger, host string, shardID int)

LogShardEngineCreatedEvent is used to log completion of history engine creation

func LogShardEngineCreatingEvent

func LogShardEngineCreatingEvent(logger bark.Logger, host string, shardID int)

LogShardEngineCreatingEvent is used to log start of history engine creation

func LogShardEngineStoppedEvent

func LogShardEngineStoppedEvent(logger bark.Logger, host string, shardID int)

LogShardEngineStoppedEvent is used to log when stopping engine for a shard has completed

func LogShardEngineStoppingEvent

func LogShardEngineStoppingEvent(logger bark.Logger, host string, shardID int)

LogShardEngineStoppingEvent is used to log when stopping engine for a shard has started

func LogShardItemCreatedEvent

func LogShardItemCreatedEvent(logger bark.Logger, host string, shardID int)

LogShardItemCreatedEvent is used to log creation of a shard item

func LogShardItemRemovedEvent

func LogShardItemRemovedEvent(logger bark.Logger, host string, shardID int, remainingShards int)

LogShardItemRemovedEvent is used to log removal of a shard item

func LogShardRangeUpdatedEvent

func LogShardRangeUpdatedEvent(logger bark.Logger, shardID int, rangeID, startSequence, endSequence int64)

LogShardRangeUpdatedEvent is used to log rangeID update for a shard

func LogTaskListLoadedEvent added in v0.3.0

func LogTaskListLoadedEvent(logger bark.Logger, taskListName string, taskListType int)

LogTaskListLoadedEvent is used to log completion of a new task list loading

func LogTaskListLoadingEvent added in v0.3.0

func LogTaskListLoadingEvent(logger bark.Logger, taskListName string, taskListType int)

LogTaskListLoadingEvent is used to log starting of a new task list loading

func LogTaskListLoadingFailedEvent added in v0.3.2

func LogTaskListLoadingFailedEvent(logger bark.Logger, taskListName string, taskListType int, err error)

LogTaskListLoadingFailedEvent is used to log failure of a new task list loading

func LogTaskListUnloadedEvent added in v0.3.0

func LogTaskListUnloadedEvent(logger bark.Logger)

LogTaskListUnloadedEvent is used to log completion of a task list unloading

func LogTaskListUnloadingEvent added in v0.3.0

func LogTaskListUnloadingEvent(logger bark.Logger)

LogTaskListUnloadingEvent is used to log starting of a task list unloading

func LogTaskProcessingFailedEvent added in v0.3.11

func LogTaskProcessingFailedEvent(logger bark.Logger, err error)

LogTaskProcessingFailedEvent is used to log failures from task processing.

func LogTransferTaskProcessingFailedEvent

func LogTransferTaskProcessingFailedEvent(logger bark.Logger, taskID int64, taskType int, err error)

LogTransferTaskProcessingFailedEvent is used to log failures from transfer task processing.

func LogUncategorizedError added in v0.3.7

func LogUncategorizedError(logger bark.Logger, err error)

LogUncategorizedError is used to log error that are uncategorized

Types

This section is empty.

Jump to

Keyboard shortcuts

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