aws / aws/aws-lambda-runtime-interface-emulator
The "Init Duration" reported by the RIE is wrong
- 主要言語
- Go
- スター
- 1.1k
- フォーク
- 118
- 平均マージ
- 42分
- マージ済み PR(30日)
- 2
説明
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)
}()
```
コントリビューションガイド
調査の方向性
Start in cmd/aws-lambda-rie/handlers.go at the InitHandler call, then follow the init lifecycle to lambda/rapid/handlers.go and sendInitRuntimeDoneLogEvent(). Verify when the Init phase ends and ensure the reported Init Duration includes language runtime startup; compare the resulting RIE log event with the expected timing.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- go
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100