Skip to content

Commit

Permalink
Merge branch 'master' into poller
Browse files Browse the repository at this point in the history
  • Loading branch information
wxing1292 authored Jan 12, 2018
2 parents f2cdce2 + 65e165c commit 773e664
Show file tree
Hide file tree
Showing 37 changed files with 1,867 additions and 252 deletions.
5 changes: 3 additions & 2 deletions .gen/go/shared/idl.go

Large diffs are not rendered by default.

683 changes: 674 additions & 9 deletions .gen/go/shared/types.go

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions client/history/metricClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (c *metricClient) StartWorkflowExecution(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.HistoryClientStartWorkflowExecutionScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.HistoryClientStartWorkflowExecutionScope, metrics.HistoryClientFailures)
}

return resp, err
Expand All @@ -72,7 +72,7 @@ func (c *metricClient) GetMutableState(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.HistoryClientGetMutableStateScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.HistoryClientGetMutableStateScope, metrics.HistoryClientFailures)
}

return resp, err
Expand All @@ -89,7 +89,7 @@ func (c *metricClient) DescribeWorkflowExecution(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.HistoryClientDescribeWorkflowExecutionScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.HistoryClientDescribeWorkflowExecutionScope, metrics.HistoryClientFailures)
}

return resp, err
Expand All @@ -106,7 +106,7 @@ func (c *metricClient) RecordDecisionTaskStarted(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.HistoryClientRecordDecisionTaskStartedScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.HistoryClientRecordDecisionTaskStartedScope, metrics.HistoryClientFailures)
}

return resp, err
Expand All @@ -123,7 +123,7 @@ func (c *metricClient) RecordActivityTaskStarted(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.HistoryClientRecordActivityTaskStartedScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.HistoryClientRecordActivityTaskStartedScope, metrics.HistoryClientFailures)
}

return resp, err
Expand All @@ -140,7 +140,7 @@ func (c *metricClient) RespondDecisionTaskCompleted(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.HistoryClientRespondDecisionTaskCompletedScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.HistoryClientRespondDecisionTaskCompletedScope, metrics.HistoryClientFailures)
}

return err
Expand All @@ -157,7 +157,7 @@ func (c *metricClient) RespondDecisionTaskFailed(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.HistoryClientRespondDecisionTaskFailedScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.HistoryClientRespondDecisionTaskFailedScope, metrics.HistoryClientFailures)
}

return err
Expand All @@ -174,7 +174,7 @@ func (c *metricClient) RespondActivityTaskCompleted(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.HistoryClientRespondActivityTaskCompletedScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.HistoryClientRespondActivityTaskCompletedScope, metrics.HistoryClientFailures)
}

return err
Expand All @@ -191,7 +191,7 @@ func (c *metricClient) RespondActivityTaskFailed(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.HistoryClientRespondActivityTaskFailedScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.HistoryClientRespondActivityTaskFailedScope, metrics.HistoryClientFailures)
}

return err
Expand All @@ -208,7 +208,7 @@ func (c *metricClient) RespondActivityTaskCanceled(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.HistoryClientRespondActivityTaskCanceledScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.HistoryClientRespondActivityTaskCanceledScope, metrics.HistoryClientFailures)
}

return err
Expand All @@ -225,7 +225,7 @@ func (c *metricClient) RecordActivityTaskHeartbeat(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.HistoryClientRecordActivityTaskHeartbeatScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.HistoryClientRecordActivityTaskHeartbeatScope, metrics.HistoryClientFailures)
}

return resp, err
Expand All @@ -242,7 +242,7 @@ func (c *metricClient) RequestCancelWorkflowExecution(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.HistoryClientRequestCancelWorkflowExecutionScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.HistoryClientRequestCancelWorkflowExecutionScope, metrics.HistoryClientFailures)
}

return err
Expand All @@ -259,7 +259,7 @@ func (c *metricClient) SignalWorkflowExecution(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.HistoryClientSignalWorkflowExecutionScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.HistoryClientSignalWorkflowExecutionScope, metrics.HistoryClientFailures)
}

return err
Expand All @@ -276,7 +276,7 @@ func (c *metricClient) TerminateWorkflowExecution(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.HistoryClientTerminateWorkflowExecutionScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.HistoryClientTerminateWorkflowExecutionScope, metrics.HistoryClientFailures)
}

return err
Expand All @@ -293,7 +293,7 @@ func (c *metricClient) ScheduleDecisionTask(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.HistoryClientScheduleDecisionTaskScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.HistoryClientScheduleDecisionTaskScope, metrics.HistoryClientFailures)
}

return err
Expand All @@ -310,7 +310,7 @@ func (c *metricClient) RecordChildExecutionCompleted(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.HistoryClientRecordChildExecutionCompletedScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.HistoryClientRecordChildExecutionCompletedScope, metrics.HistoryClientFailures)
}

return err
Expand Down
14 changes: 7 additions & 7 deletions client/matching/metricClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (c *metricClient) AddActivityTask(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.MatchingClientAddActivityTaskScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.MatchingClientAddActivityTaskScope, metrics.MatchingClientFailures)
}

return err
Expand All @@ -72,7 +72,7 @@ func (c *metricClient) AddDecisionTask(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.MatchingClientAddDecisionTaskScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.MatchingClientAddDecisionTaskScope, metrics.MatchingClientFailures)
}

return err
Expand All @@ -89,7 +89,7 @@ func (c *metricClient) PollForActivityTask(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.MatchingClientPollForActivityTaskScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.MatchingClientPollForActivityTaskScope, metrics.MatchingClientFailures)
}

return resp, err
Expand All @@ -106,7 +106,7 @@ func (c *metricClient) PollForDecisionTask(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.MatchingClientPollForDecisionTaskScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.MatchingClientPollForDecisionTaskScope, metrics.MatchingClientFailures)
}

return resp, err
Expand All @@ -123,7 +123,7 @@ func (c *metricClient) QueryWorkflow(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.MatchingClientQueryWorkflowScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.MatchingClientQueryWorkflowScope, metrics.MatchingClientFailures)
}

return resp, err
Expand All @@ -140,7 +140,7 @@ func (c *metricClient) RespondQueryTaskCompleted(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.MatchingClientRespondQueryTaskCompletedScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.MatchingClientRespondQueryTaskCompletedScope, metrics.MatchingClientFailures)
}

return err
Expand All @@ -157,7 +157,7 @@ func (c *metricClient) CancelOutstandingPoll(
sw.Stop()

if err != nil {
c.metricsClient.IncCounter(metrics.MatchingClientCancelOutstandingPollScope, metrics.CadenceFailures)
c.metricsClient.IncCounter(metrics.MatchingClientCancelOutstandingPollScope, metrics.MatchingClientFailures)
}

return err
Expand Down
2 changes: 2 additions & 0 deletions common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ const (
FirstEventID int64 = 1
// EmptyEventID is the id of the empty event
EmptyEventID int64 = -23
// EndEventID is the id of the end event, here we use the int64 max
EndEventID int64 = 1<<63 - 1
)

const (
Expand Down
1 change: 1 addition & 0 deletions common/logging/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const (
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"
Expand Down
Loading

0 comments on commit 773e664

Please sign in to comment.