@@ -359,7 +359,7 @@ func handleStart(ctx context.Context, execCtx *rapidContext, watchdog *core.Watc
359
359
if ! startRequest .SuppressInit {
360
360
if err := doInit (ctx , execCtx , watchdog ); err != nil {
361
361
log .WithError (err ).WithField ("InvokeID" , startRequest .InvokeID ).Error ("Init failed" )
362
- doneFailMsg := generateDoneFail (execCtx , startRequest .CorrelationID , nil )
362
+ doneFailMsg := generateDoneFail (execCtx , startRequest .CorrelationID , nil , 0 )
363
363
handleInitError (doneFailMsg , execCtx , startRequest .InvokeID , interopServer , err )
364
364
return
365
365
}
@@ -378,9 +378,13 @@ func handleStart(ctx context.Context, execCtx *rapidContext, watchdog *core.Watc
378
378
if err := interopServer .SendDone (doneMsg ); err != nil {
379
379
log .Panic (err )
380
380
}
381
+
382
+ if err := interopServer .StartAcceptingDirectInvokes (); err != nil {
383
+ log .Panic (err )
384
+ }
381
385
}
382
386
383
- func generateDoneFail (execCtx * rapidContext , correlationID string , invokeMx * rendering.InvokeRendererMetrics ) * interop.DoneFail {
387
+ func generateDoneFail (execCtx * rapidContext , correlationID string , invokeMx * rendering.InvokeRendererMetrics , invokeReceivedTime int64 ) * interop.DoneFail {
384
388
errorType , found := appctx .LoadFirstFatalError (execCtx .appCtx )
385
389
if ! found {
386
390
errorType = fatalerror .Unknown
@@ -392,6 +396,7 @@ func generateDoneFail(execCtx *rapidContext, correlationID string, invokeMx *ren
392
396
Meta : interop.DoneMetadata {
393
397
RuntimeRelease : appctx .GetRuntimeRelease (execCtx .appCtx ),
394
398
NumActiveExtensions : execCtx .registrationService .CountAgents (),
399
+ InvokeReceivedTime : invokeReceivedTime ,
395
400
},
396
401
}
397
402
@@ -414,7 +419,7 @@ func handleInvoke(ctx context.Context, execCtx *rapidContext, watchdog *core.Wat
414
419
415
420
if err := doInvoke (ctx , execCtx , watchdog , invokeRequest , & invokeMx ); err != nil {
416
421
log .WithError (err ).WithField ("InvokeID" , invokeRequest .ID ).Error ("Invoke failed" )
417
- doneFailMsg := generateDoneFail (execCtx , invokeRequest .CorrelationID , & invokeMx )
422
+ doneFailMsg := generateDoneFail (execCtx , invokeRequest .CorrelationID , & invokeMx , invokeRequest . InvokeReceivedTime )
418
423
handleInvokeError (doneFailMsg , execCtx , invokeRequest .ID , interopServer , err )
419
424
return
420
425
}
@@ -436,6 +441,7 @@ func handleInvoke(ctx context.Context, execCtx *rapidContext, watchdog *core.Wat
436
441
InvokeRequestReadTimeNs : invokeMx .ReadTime .Nanoseconds (),
437
442
InvokeRequestSizeBytes : int64 (invokeMx .SizeBytes ),
438
443
InvokeCompletionTimeNs : invokeCompletionTimeNs ,
444
+ InvokeReceivedTime : invokeRequest .InvokeReceivedTime ,
439
445
},
440
446
}
441
447
if execCtx .telemetryAPIEnabled {
0 commit comments