aws / aws/aws-lambda-runtime-interface-emulator

The "Init Duration" reported by the RIE is wrong

Aperta
#106 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement good first issue
Lingua principale
Go
Stelle
1.1k
Fork
118
Merge medio
42m
PR unite (30g)
2

Descrizione

The "Init Duration" reported by the RIE is much too small. It is taken [before the actual language runtime is even started](https://github.com/aws/aws-lambda-runtime-interface-emulator/blob/2057adac54dbd781b51431f775363ec021648c77/cmd/aws-lambda-rie/handlers.go#L98):
```go
initStart, initEnd := InitHandler(sandbox, functionVersion, timeout, bs)
```

Instead, the end of the Init phase should be recorded when the [`sendInitRuntimeDoneLogEvent()`](https://github.com/aws/aws-lambda-runtime-interface-emulator/blob/2057adac54dbd781b51431f775363ec021648c77/lambda/rapid/handlers.go#L358) is posted:
```go
defer func() {
sendInitRuntimeDoneLogEvent(execCtx, sbInfoFromInit.SandboxType, runtimeDoneStatus)
}()
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia in cmd/aws-lambda-rie/handlers.go, alla chiamata a InitHandler, quindi segui il ciclo di vita di init fino a lambda/rapid/handlers.go e sendInitRuntimeDoneLogEvent(). Verifica quando termina la fase Init e assicurati che la Init Duration riportata includa l’avvio del language runtime; confronta l’evento di log RIE risultante con il timing previsto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
go
Ambito
tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
68/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.