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

The "Init Duration" reported by the RIE is wrong

Abierto
#106 2 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement good first issue
Lenguaje dominante
Go
Estrellas
1.1k
Forks
118
Merge medio
42 min
PR fusionados (30 d)
2

Descripción

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)
}()
```

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza en cmd/aws-lambda-rie/handlers.go, en la llamada a InitHandler; después sigue el ciclo de vida de init hasta lambda/rapid/handlers.go y sendInitRuntimeDoneLogEvent(). Verifica cuándo termina la fase Init y asegúrate de que la Init Duration informada incluya el inicio del language runtime; compara el evento de log de RIE resultante con el timing esperado.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
go
Área
tooling
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
68/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.