Skip to content

Commit

Permalink
Add domain name and tasklist tags to logs
Browse files Browse the repository at this point in the history
  • Loading branch information
taylanisikdemir committed Mar 5, 2024
1 parent dcb4be7 commit e3ca207
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions service/frontend/api/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ func (wh *WorkflowHandler) PollForActivityTask(
if err := common.ValidateLongPollContextTimeout(
ctx,
"PollForActivityTask",
wh.GetThrottledLogger(),
wh.GetThrottledLogger().WithTags(tag.WorkflowDomainName(domainName), tag.WorkflowTaskListName(pollRequest.GetTaskList().GetName())),
); err != nil {
return nil, err
}
Expand Down Expand Up @@ -478,7 +478,7 @@ func (wh *WorkflowHandler) PollForActivityTask(
if err := common.ValidateLongPollContextTimeout(
ctx,
"PollForActivityTask",
wh.GetThrottledLogger(),
wh.GetThrottledLogger().WithTags(tag.WorkflowDomainName(domainName), tag.WorkflowTaskListName(pollRequest.GetTaskList().GetName())),

Check warning on line 481 in service/frontend/api/handler.go

View check run for this annotation

Codecov / codecov/patch

service/frontend/api/handler.go#L481

Added line #L481 was not covered by tests
); err != nil {
return &types.PollForActivityTaskResponse{}, nil
}
Expand Down Expand Up @@ -544,7 +544,7 @@ func (wh *WorkflowHandler) PollForDecisionTask(
if err := common.ValidateLongPollContextTimeout(
ctx,
"PollForDecisionTask",
wh.GetThrottledLogger(),
wh.GetThrottledLogger().WithTags(tag.WorkflowDomainName(domainName), tag.WorkflowTaskListName(pollRequest.GetTaskList().GetName())),
); err != nil {
return nil, err
}
Expand Down Expand Up @@ -598,7 +598,7 @@ func (wh *WorkflowHandler) PollForDecisionTask(
if err := common.ValidateLongPollContextTimeout(
ctx,
"PollForDecisionTask",
wh.GetThrottledLogger(),
wh.GetThrottledLogger().WithTags(tag.WorkflowDomainName(domainName), tag.WorkflowTaskListName(pollRequest.GetTaskList().GetName())),

Check warning on line 601 in service/frontend/api/handler.go

View check run for this annotation

Codecov / codecov/patch

service/frontend/api/handler.go#L601

Added line #L601 was not covered by tests
); err != nil {
return &types.PollForDecisionTaskResponse{}, nil
}
Expand Down

0 comments on commit e3ca207

Please sign in to comment.