@@ -314,7 +314,8 @@ public Uni<Response> enqueue()
314314 Call call = callClient .newCall ( requestBuilder .build () );
315315
316316 final long nano = System .nanoTime ();
317- final String timestamp = System .currentTimeMillis () + "." + nano ; // to identify the beginning/ending log message
317+ final long mill = System .currentTimeMillis ();
318+ final String timestamp = mill + "." + nano ; // to identify the beginning/ending log message
318319 final HttpUrl url = call .request ().url ();
319320 final String method = call .request ().method ();
320321 logger .info ( "Starting upstream request: [{}] {} ({})" , method , url , timestamp );
@@ -337,8 +338,8 @@ public void onFailure( @NotNull Call call, @NotNull IOException e )
337338 scope .close ();
338339 span .end ();
339340
340- logger .warn ( String .format ("Failed: [%s] %s (%s), latency: %s " , method , url , timestamp ,
341- System .nanoTime () - nano ), e );
341+ logger .warn ( String .format ("Failed: [%s] %s (%s), latency: %sms " , method , url , timestamp ,
342+ System .currentTimeMillis () - mill ), e );
342343 p .fail ( e );
343344 }
344345
@@ -354,8 +355,8 @@ public void onResponse( @NotNull Call call, @NotNull Response response )
354355 scope .close ();
355356 span .end ();
356357
357- logger .info ( "Success: [{}] {} -> {} ({}), latency: {}" , method , url , response .code (), timestamp ,
358- System .nanoTime () - nano );
358+ logger .info ( "Success: [{}] {} -> {} ({}), latency: {}ms " , method , url , response .code (), timestamp ,
359+ System .currentTimeMillis () - mill );
359360 p .complete ( response );
360361 }
361362 } );
0 commit comments