Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#770 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@zhongkechen đang làm issue này rồi.

Từ ngày 3/10/2026.

  • #771 của @zhongkechen — đang mở

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
40/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
observability

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Java
Star
28
Fork
13
Merge trung bình
2 ngày 8 giờ
Pull request đã merge (30 ngày)
40

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aws/aws-durable-execution-sdk-java

Tất cả issue của aws/aws-durable-execution-sdk-java

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.