[Feature]: Define plugin telemetry coverage and recovery for hard Lambda invocation timeouts
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- aws, java
- 领域
- backend, observability
调研方向
Start with DurableExecutionPlugin.java and TelemetryPlugin.java at the reviewed commit; trace the invocation-end emission and exporter drain path. Then read the cross-SDK counterpart and issue #848 to understand the boundary of this scope. Define the supported loss and recovery contract, and add focused process or cloud qualification for timeout, resume, and terminal-without-resume cases while preserving retry and attempt semantics.
由索引模型根据 Issue 内容生成。
描述
Problem
When Lambda terminates an invocation during a long-running step, that process cannot reliably execute its user-function/operation/invocation End hooks or finish queued exporter I/O. This leaves a gap in the telemetry for the interrupted invocation.
This affects the shared plugin lifecycle, including Durable Execution Telemetry's final record/drain/flush and OTel's open spans. It needs an explicit supported coverage and recovery contract. It is a platform/lifecycle limitation, not evidence that an in-process hook can execute after the runtime has already been killed.
Observable Impact
For the Durable Execution Telemetry plugin:
- The interrupted invocation may never reach the End hook that emits its closing record and drains/flushes exporters.
- In on-change mode, previously delivered RUNNING snapshots can remain available, but later queued or in-memory data is not guaranteed to arrive.
- In on-complete/on-failure mode, the killed invocation cannot produce the corresponding final record through its normal End path.
- If the durable execution resumes, a later invocation can export a new snapshot of persisted state. That does not recover all invocation-local timing or uncheckpointed work from the terminated process.
- If the service later terminates the execution without another handler invocation, an in-process plugin alone may never emit the execution's final outcome.
For OTel, attempt/operation/invocation spans that remain open at the hard timeout lack normal End callbacks. Already-ended spans may have been exported before the timeout; this issue does not assume all spans are buffered until invocation End.
Under at-least-once-per-retry semantics, interruption can re-run the same durable step attempt. Repeated attempt number 1 is not itself a numbering defect when no failure was checkpointed. Do not fabricate extra step failures or retries merely to make the telemetry look complete.
Reproduction and Qualification
- Deploy a durable handler with a named step whose body remains active beyond the Lambda function timeout; for example, a 20-second test delay inside the step with a 10-second function timeout. Configure the durable execution timeout separately.
- Enable sampling and a telemetry exporter destination. Inspect on-change, on-complete and on-failure modes separately where supported.
- Correlate platform timeout logs, durable execution history and exported records by execution ARN. Inspect records delivered before the kill and the absence of normal finalization from the killed invocation.
- Exercise a timeout followed by a successful resumed invocation using a test-controlled external gate inside the step; use stable, checkpointed orchestration. Verify that completed operations are replayed and not executed again.
- Separately exercise exhaustion/terminal execution without another handler invocation. Identify which authoritative platform/service evidence remains available.
- Repeat OTel coverage with each view separately if qualifying trace visibility alongside telemetry records.
These steps describe the required cloud qualification; no new Lambda run was performed for this issue. Existing bug-bash reports describe missing SDK telemetry after hard timeouts, but exact deployed artifact versions and raw exporter records have not been independently re-read here.
Proposed Scope and Acceptance Criteria
- Document which lifecycle hooks and exporter guarantees require orderly invocation finalization, and what a hard runtime timeout can lose.
- Explain the telemetry emit-mode behavior above and how a later invocation's persisted-state snapshot differs from telemetry of the interrupted work.
- Define the supported diagnostic/recovery path for invocations or executions with no subsequent handler run: platform logs, service history and/or an out-of-process collection path, with clear ownership.
- Decide whether any bounded, best-effort pre-deadline emission is supported. If selected, state its limits and test it without claiming a guaranteed post-kill callback or exactly-once delivery. If unsupported, make the limitation explicit.
- Add focused process/cloud qualification that distinguishes abrupt termination from a caught exception or ordinary PENDING suspension. Verify evidence before and after one resume, completed-work replay, and the terminal-without-resume case.
- Preserve business outcomes, at-least-once retry semantics and recorded attempt counts. Do not manufacture durable operations, failures, start/end times or successful exporter acknowledgements.
- Keep any OTel-specific visualization work separate from the common SDK/plugin delivery contract.
Source and Affected Packages
Reviewed Java source at 4b1aa82b; this identifies inspected source, not a newly verified deployment.
The telemetry plugin consumes operation snapshots rather than accumulating operation-End events. This finding concerns losing the finalization/export opportunity when the runtime dies, not duplicate completion notification counting.
Related Work
- #848 concerns stop or durable execution timeout while the current invocation survives and can potentially obtain authoritative terminal status. Here the Lambda runtime is terminated, so that in-process lookup opportunity is absent.
- Invocation-deadline/worker-cleanup improvements can reduce some exposure but cannot guarantee that arbitrary blocked work or exporter I/O completes before a hard platform kill.
- This is the Java SDK tracking item for the cross-SDK hard-invocation-timeout telemetry finding (F19).
Cross-SDK counterpart: https://github.com/aws/aws-durable-execution-sdk-js/issues/1128
- 主要语言
- Java
- 星标
- 28
- 派生
- 16
- 平均合并
- 2 天 59 分钟
- 30 天内合并 PR
- 62
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aws/aws-durable-execution-sdk-java 的其他 Issue
-
bug pkg:conformance
难度 2/5 1-3 小时 新手友好度 76/100
aws/aws-durable-execution-sdk-java#844 ·
维护者通常 1 天内回复
-
documentation pkg:sdk
难度 1/5 1-3 小时 新手友好度 88/100
aws/aws-durable-execution-sdk-java#645 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
aws/aws-durable-execution-sdk-java#300 ·
维护者通常 1 天内回复
-
bug needs-triage pkg:sdk
难度 5/5 一周以上 新手友好度 35/100
aws/aws-durable-execution-sdk-java#859 ·
维护者通常 1 天内回复
-
bug needs-triage pkg:otel
难度 4/5 3-5 天 新手友好度 48/100
aws/aws-durable-execution-sdk-java#858 ·
维护者通常 1 天内回复
查看 aws/aws-durable-execution-sdk-java 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 66/100
Shweit/EtherealPortals#30 ·
-
Typo in jakartaee-bom 12.0.0-SNAPSHOT with cdi可能已有人在做 @ElectLive 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 80/100
jakartaee/jakartaee-api#205 · 1 条评论 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
liberation-data/drivine4j#547 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 70/100
-
BindingServiceProperties.bindings regressed to a non-thread-safe TreeMap in GH-3158: concurrent first use of binding names corrupts it可能已有人在做 @AkashB23 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 62/100
spring-cloud/spring-cloud-stream#3321 ·
维护者通常 1 天内回复