add id to all call invocation logs

This commit is contained in:
Reed Allman
2017-09-07 18:18:32 -07:00
parent c7ebf0d7ba
commit 1d0a63ca99
3 changed files with 13 additions and 2 deletions

View File

@@ -180,6 +180,7 @@ func (a *agent) Submit(callI Call) error {
call := callI.(*call)
ctx := call.req.Context()
span, ctx := opentracing.StartSpanFromContext(ctx, "agent_submit")
defer span.Finish()
@@ -485,8 +486,7 @@ func (s *hotSlot) exec(ctx context.Context, call *call) error {
}
// link the container id and id in the logs [for us!]
// TODO go is broke idk why logrus.Fields doesn't work
common.Logger(ctx).WithField("container_id", s.container.id).WithField("id", call.ID).Info("starting call")
common.Logger(ctx).WithField("container_id", s.container.id).Info("starting call")
// swap in the new id and the new stderr logger
s.container.swap(stderr)