You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The extension relies on 3 independent mechanisms to minimize the time interval between the end of the execution of
218
-
// the lambda function and the end of the execution of processEvent()
219
-
// 1) AgentDoneSignal is triggered upon reception of a `flushed=true` query from the agent
220
-
// 2) [Backup 1] RuntimeDone is triggered upon reception of a Lambda log entry certifying the end of the execution of the current function
221
-
// 3) [Backup 2] If all else fails, the extension relies of the timeout of the Lambda function to interrupt itself 200 ms before the specified deadline.
222
-
// This time interval is large enough to attempt a last flush attempt (if SendStrategy == syncFlush) before the environment gets shut down.
223
-
224
+
// The extension relies on 3 independent mechanisms to minimize the time interval
225
+
// between the end of the execution of the lambda function and the end of the
226
+
// execution of processEvent():
227
+
// 1) AgentDoneSignal triggered upon reception of a `flushed=true` query from the agent
228
+
// 2) [Backup 1] All expected log events are processed.
229
+
// 3) [Backup 2] If all else fails, the extension relies of the timeout of the Lambda
230
+
// function to interrupt itself 200ms before the specified deadline to give the extension
231
+
// time to flush data before shutdown.
224
232
select {
225
233
case<-app.apmClient.WaitForFlush():
226
234
app.logger.Debug("APM client has sent flush signal")
227
-
case<-runtimeDone:
235
+
case<-logProcessingDone:
228
236
app.logger.Debug("Received runtimeDone signal")
229
237
case<-timer.C:
230
-
app.logger.Info("Time expired waiting for agent signal or runtimeDone event")
238
+
app.logger.Info("Time expired while waiting for agent done signal or final log event")
0 commit comments