File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -2292,6 +2292,7 @@ const (
22922292 HistoryFailoverCallbackCount
22932293 WorkflowVersionCount
22942294 WorkflowTypeCount
2295+ WorkflowStartedCount
22952296 LargeHistoryBlobCount
22962297 LargeHistoryEventCount
22972298 LargeHistorySizeCount
@@ -2899,6 +2900,7 @@ var MetricDefs = map[ServiceIdx]map[int]metricDefinition{
28992900 ReplicationTasksCount : {metricName : "replication_tasks_count" , metricType : Timer },
29002901 WorkflowVersionCount : {metricName : "workflow_version_count" , metricType : Gauge },
29012902 WorkflowTypeCount : {metricName : "workflow_type_count" , metricType : Gauge },
2903+ WorkflowStartedCount : {metricName : "workflow_started_count" , metricType : Counter },
29022904 LargeHistoryBlobCount : {metricName : "large_history_blob_count" , metricType : Counter },
29032905 LargeHistoryEventCount : {metricName : "large_history_event_count" , metricType : Counter },
29042906 LargeHistorySizeCount : {metricName : "large_history_size_count" , metricType : Counter },
Original file line number Diff line number Diff line change @@ -952,6 +952,9 @@ func (t *transferActiveTaskExecutor) processRecordWorkflowStartedOrUpsertHelper(
952952 recordStart bool ,
953953) (retError error ) {
954954
955+ workflowStartedScope := t .metricsClient .Scope (metrics .TransferActiveTaskRecordWorkflowStartedScope ,
956+ metrics .DomainTag (task .DomainID ))
957+
955958 wfContext , release , err := t .executionCache .GetOrCreateWorkflowExecutionWithTimeout (
956959 task .DomainID ,
957960 getWorkflowExecution (task ),
@@ -1011,6 +1014,7 @@ func (t *transferActiveTaskExecutor) processRecordWorkflowStartedOrUpsertHelper(
10111014 release (nil )
10121015
10131016 if recordStart {
1017+ workflowStartedScope .IncCounter (metrics .WorkflowStartedCount )
10141018 return t .recordWorkflowStarted (
10151019 ctx ,
10161020 task .DomainID ,
Original file line number Diff line number Diff line change @@ -455,6 +455,9 @@ func (t *transferStandbyTaskExecutor) processRecordWorkflowStartedOrUpsertHelper
455455 isRecordStart bool ,
456456) error {
457457
458+ workflowStartedScope := t .metricsClient .Scope (metrics .TransferStandbyTaskRecordWorkflowStartedScope ,
459+ metrics .DomainTag (transferTask .DomainID ))
460+
458461 // verify task version for RecordWorkflowStarted.
459462 // upsert doesn't require verifyTask, because it is just a sync of mutableState.
460463 if isRecordStart {
@@ -489,6 +492,7 @@ func (t *transferStandbyTaskExecutor) processRecordWorkflowStartedOrUpsertHelper
489492 numClusters := (int16 )(len (domainEntry .GetReplicationConfig ().Clusters ))
490493
491494 if isRecordStart {
495+ workflowStartedScope .IncCounter (metrics .WorkflowStartedCount )
492496 return t .recordWorkflowStarted (
493497 ctx ,
494498 transferTask .DomainID ,
You can’t perform that action at this time.
0 commit comments