File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,14 @@ func (ti *TelemetryInterceptor) emitActionMetric(
257257 }
258258
259259 switch methodName {
260+ case startWorkflowExecution :
261+ resp , ok := result .(* workflowservice.StartWorkflowExecutionResponse )
262+ if ! ok {
263+ return
264+ }
265+ if resp .Started {
266+ metrics .ActionCounter .With (metricsHandler ).Record (1 , metrics .ActionType ("grpc_" + methodName ))
267+ }
260268 case executeMultiOperation :
261269 resp , ok := result .(* workflowservice.ExecuteMultiOperationResponse )
262270 if ! ok {
Original file line number Diff line number Diff line change @@ -71,10 +71,15 @@ func TestEmitActionMetric(t *testing.T) {
7171 req any
7272 resp any
7373 }{
74+ {
75+ methodName : startWorkflow ,
76+ fullName : api .WorkflowServicePrefix + startWorkflow ,
77+ resp : & workflowservice.StartWorkflowExecutionResponse {Started : false },
78+ },
7479 {
7580 methodName : startWorkflow ,
7681 fullName : api .WorkflowServicePrefix + startWorkflow ,
77- resp : & workflowservice.StartWorkflowExecutionResponse {},
82+ resp : & workflowservice.StartWorkflowExecutionResponse {Started : true },
7883 expectEmitMetrics : true ,
7984 },
8085 {
You can’t perform that action at this time.
0 commit comments