Skip to content

Commit

Permalink
Attempt at adding hostport info to logs (cadence-workflow#6152)
Browse files Browse the repository at this point in the history
* Attempt at adding hostport info to logs

* Added more log info

* Resolved code comments
  • Loading branch information
agautam478 authored Jul 17, 2024
1 parent 8664922 commit 568fcc2
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions client/history/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,26 @@ func (c *clientImpl) DescribeHistoryHost(

if request.ShardIDForHost != nil {
peer, err = c.peerResolver.FromShardID(int(request.GetShardIDForHost()))
if err != nil {
c.logger.Error("peer could not be resolved for host.", tag.Error(err), tag.ShardID(int(request.GetShardIDForHost())))
return nil, err
}

} else if request.ExecutionForHost != nil {
peer, err = c.peerResolver.FromWorkflowID(request.ExecutionForHost.GetWorkflowID())
if err != nil {
c.logger.Error("peer could not be resolved for workflow.", tag.Error(err), tag.WorkflowID(request.ExecutionForHost.GetWorkflowID()))
return nil, err
}

} else {
peer, err = c.peerResolver.FromHostAddress(request.GetHostAddress())
}
if err != nil {
return nil, err
}
if err != nil {
c.logger.Error("peer could not be resolved for address.", tag.Error(err), tag.Address(request.GetHostAddress()))
return nil, err
}

}
var response *types.DescribeHistoryHostResponse
op := func(ctx context.Context, peer string) error {
var err error
Expand Down

0 comments on commit 568fcc2

Please sign in to comment.