Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: root handler instrumentation misses the canonical OTel execution context

未关闭
#770 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@zhongkechen 已经在做这个了。

开始于 2026年10月3日。

  • #771 来自 @zhongkechen —— 未关闭

评估

难度
5/5
预计耗时
一周以上
新手友好度
40/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
java
领域
observability

调研方向

Start with Java conformance PR #769, case22, and the LocalDurableTestRunner regression on main61f5d103. Trace the core/plugin lifecycle hooks and handler-thread behavior; done means root probes join the canonical trace in both views, context is restored across success, failure, suspension, and resume, and older combinations retain behavior.

由索引模型根据 Issue 内容生成。

描述

needs-triage
Expected behavior

User instrumentation in the root durable handler should join the canonical execution trace in both OTel views, including before/after nested operations and after resume. Preserve a valid same-trace ambient Lambda span; otherwise activate the view root (Workflow for execution view, Invocation for invocation view). Restore the previous context on the same handler thread on success, failure and suspension.

Actual behavior

The plugins select the canonical trace for SDK spans but never activate context around the root handler body. Nested callbacks have scopes, while root instrumentation sees either an invalid context or an unrelated ambient trace. SpanContext.isValid() alone does not detect the latter.

Java conformance PR #769, head078ce3b719f8bebf5fe5ab77a6f06c148fa3cf7f, exposes this in case22 on both views and both deployed backends (ADOT/X-Ray and Community/S3). Root probes conformance.handler, conformance.handler-restored, and conformance.handler-after-resume are absent from the canonical trace; nested callback probes pass. Deployed run: https://github.com/aws/aws-durable-execution-sdk-java/actions/runs/37079677202

A local public LocalDurableTestRunner regression also reproduces invalid root context without an agent on current main61f5d103, both sampled and unsampled, while the plugins already know the canonical trace. Supplying a different valid ambient trace reproduces incorrect trace membership.

Scope

Provide a focused nonbreaking core/plugin lifecycle capability. The scope must close on the handler thread: invocation end hooks can run on a different CompletableFuture completion thread. Preserve source/binary APIs, seven-component InvocationInfo, existing config/replay identities, released core/plugin combinations and separate plugin layers. Older cores may lack the new capability but must retain existing behavior. No major factory migration, handler-fixture parent binding, or weaker conformance assertions.

Related topology issue #644 handled SDK span parent selection, not root handler activation. #721 is the separate breaking plugin-lifetime migration. Coverage searches found no current implementation of this handler scope.

主要语言
Java
星标
28
派生
13
平均合并
2 天 8 小时
30 天内合并 PR
40

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aws/aws-durable-execution-sdk-java 的其他 Issue

查看 aws/aws-durable-execution-sdk-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。