Skip to content

Commit 86d7d30

Browse files
committed
Create/Update Schedule logging
1 parent c0083c8 commit 86d7d30

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

service/frontend/workflow_handler.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3122,6 +3122,11 @@ func (wh *WorkflowHandler) createScheduleWorkflow(
31223122
return nil, err
31233123
}
31243124

3125+
if startWorkflow := request.GetSchedule().GetAction().GetStartWorkflow(); startWorkflow != nil {
3126+
metricsHandler := wh.metricsScope(ctx).WithTags(metrics.HeaderCallsiteTag("CreateSchedule"))
3127+
metrics.HeaderSize.With(metricsHandler).Record(int64(startWorkflow.GetHeader().Size()))
3128+
}
3129+
31253130
// size limits will be validated on history. note that the start workflow request is
31263131
// embedded in the schedule, which is in the scheduler input. so if the scheduler itself
31273132
// doesn't exceed the limit, the started workflows should be safe as well.
@@ -3977,6 +3982,11 @@ func (wh *WorkflowHandler) updateScheduleWorkflow(
39773982
return nil, err
39783983
}
39793984

3985+
if startWorkflow := request.GetSchedule().GetAction().GetStartWorkflow(); startWorkflow != nil {
3986+
metricsHandler := wh.metricsScope(ctx).WithTags(metrics.HeaderCallsiteTag("UpdateSchedule"))
3987+
metrics.HeaderSize.With(metricsHandler).Record(int64(startWorkflow.GetHeader().Size()))
3988+
}
3989+
39803990
input := &schedulespb.FullUpdateRequest{
39813991
Schedule: request.Schedule,
39823992
SearchAttributes: request.SearchAttributes,

0 commit comments

Comments
 (0)