@@ -172,7 +172,7 @@ func runJob(ctx context.Context, helper worker.Helper, job opslevel.RunnerJob) p
172172 go streamer .Run (ctx )
173173
174174 pkg .MetricJobsProcessing .Inc ()
175- logger .Info ().Msgf ( "Starting job '%s' " , job .Id )
175+ logger .Info ().Str ( "job_id " , string ( job .Id )). Msg ( "job started" )
176176 runner := pkg .NewJobRunner ("faktory" , cfgFile )
177177 outcome := runner .Run (ctx , job , streamer .Stdout , streamer .Stderr )
178178 streamer .Flush (outcome )
@@ -186,7 +186,12 @@ func emitJobStartedMetrics() time.Time {
186186
187187func emitJobCompleteMetrics (jobStart time.Time , job opslevel.RunnerJob , outcome pkg.JobOutcome ) {
188188 jobDuration := time .Since (jobStart )
189- log .Info ().Str ("outcome" , outcome .Message ).Msgf ("Finished job '%s' took '%s' and had outcome '%s'" , job .Id , jobDuration , outcome .Outcome )
189+ log .Info ().
190+ Str ("job_id" , string (job .Id )).
191+ Str ("outcome" , string (outcome .Outcome )).
192+ Int64 ("duration_ms" , jobDuration .Milliseconds ()).
193+ Str ("outcome_message" , outcome .Message ).
194+ Msg ("job finished" )
190195 pkg .MetricJobsDuration .Observe (jobDuration .Seconds ())
191196 pkg .MetricJobsFinished .WithLabelValues (string (outcome .Outcome )).Inc ()
192197 pkg .MetricJobsProcessing .Dec ()
0 commit comments