diff --git a/common/rpc/interceptor/telemetry.go b/common/rpc/interceptor/telemetry.go index 8d285087ec8..188ad865ea5 100644 --- a/common/rpc/interceptor/telemetry.go +++ b/common/rpc/interceptor/telemetry.go @@ -221,8 +221,10 @@ func (ti *TelemetryInterceptor) emitActionMetric( case enums.COMMAND_TYPE_RECORD_MARKER: // handle RecordMarker command, they are used for localActivity, sideEffect, versioning etc. hasMarker = true - markerName := command.GetRecordMarkerCommandAttributes().GetMarkerName() - metricsHandler.Counter(metrics.ActionCounter.GetMetricName()).Record(1, metrics.ActionType("command_RecordMarker_"+markerName)) + case enums.COMMAND_TYPE_START_CHILD_WORKFLOW_EXECUTION: + // Each child workflow counts as 2 actions. We use separate tags to track them separately. + metricsHandler.Counter(metrics.ActionCounter.GetMetricName()).Record(1, metrics.ActionType("command_"+command.CommandType.String())) + metricsHandler.Counter(metrics.ActionCounter.GetMetricName()).Record(1, metrics.ActionType("command_"+command.CommandType.String()+"_Extra")) default: // handle all other command action metricsHandler.Counter(metrics.ActionCounter.GetMetricName()).Record(1, metrics.ActionType("command_"+command.CommandType.String()))