@@ -467,8 +467,10 @@ func (t *ControllableTask) Launch() error {
467467 if err != nil {
468468 log .WithField ("partition" , t .knownEnvironmentId .String ()).
469469 WithField ("detector" , t .knownDetector ).
470+ WithField ("taskId" , t .ti .TaskID .GetValue ()).
471+ WithField ("taskName" , t .ti .Name ).
470472 WithError (err ).
471- Warning ("error marshaling message from task " )
473+ Warning ("error marshaling message" )
472474 } else {
473475 t .sendMessage (jsonEvent )
474476 log .WithField ("partition" , t .knownEnvironmentId .String ()).
@@ -492,6 +494,8 @@ func (t *ControllableTask) Launch() error {
492494 if t .rpc == nil {
493495 log .WithField ("partition" , t .knownEnvironmentId .String ()).
494496 WithField ("detector" , t .knownDetector ).
497+ WithField ("taskId" , deo .TaskId .GetValue ()).
498+ WithField ("taskName" , t .ti .Name ).
495499 WithError (err ).
496500 Debug ("event stream done" )
497501 break
@@ -500,6 +504,8 @@ func (t *ControllableTask) Launch() error {
500504 if err == io .EOF {
501505 log .WithField ("partition" , t .knownEnvironmentId .String ()).
502506 WithField ("detector" , t .knownDetector ).
507+ WithField ("taskId" , deo .TaskId .GetValue ()).
508+ WithField ("taskName" , t .ti .Name ).
503509 WithError (err ).
504510 Debug ("event stream EOF" )
505511 break
@@ -510,7 +516,9 @@ func (t *ControllableTask) Launch() error {
510516 WithField ("detector" , t .knownDetector ).
511517 WithField ("errorType" , reflect .TypeOf (err )).
512518 WithField ("level" , infologger .IL_Devel ).
513- Warningf ("error receiving event from task %s" , deo .TaskId .String ())
519+ WithField ("taskId" , deo .TaskId .GetValue ()).
520+ WithField ("taskName" , t .ti .Name ).
521+ Warning ("error receiving event" )
514522 if status .Code (err ) == codes .Unavailable {
515523 break
516524 }
@@ -522,6 +530,8 @@ func (t *ControllableTask) Launch() error {
522530 if deviceEvent == nil {
523531 log .WithField ("partition" , t .knownEnvironmentId .String ()).
524532 WithField ("detector" , t .knownDetector ).
533+ WithField ("taskId" , deo .TaskId .GetValue ()).
534+ WithField ("taskName" , t .ti .Name ).
525535 Debug ("nil DeviceEvent received (NULL_DEVICE_EVENT) - closing stream" )
526536 break
527537 } else {
@@ -591,10 +601,14 @@ func (t *ControllableTask) Launch() error {
591601 _ = t .rpc .Close () // NOTE: might return non-nil error, but we don't care much
592602 log .WithField ("partition" , t .knownEnvironmentId .String ()).
593603 WithField ("detector" , t .knownDetector ).
604+ WithField ("taskId" , t .ti .TaskID .GetValue ()).
605+ WithField ("taskName" , t .ti .Name ).
594606 Debug ("rpc client closed" )
595607 t .rpc = nil
596608 log .WithField ("partition" , t .knownEnvironmentId .String ()).
597609 WithField ("detector" , t .knownDetector ).
610+ WithField ("taskId" , t .ti .TaskID .GetValue ()).
611+ WithField ("taskName" , t .ti .Name ).
598612 Debug ("rpc client removed" )
599613 }
600614
0 commit comments