Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#770 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@zhongkechen ci sta già lavorando.

Dal 3/10/2026.

  • #771 di @zhongkechen — aperta

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
40/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java
Ambito
observability

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Java
Stelle
28
Fork
14
Merge medio
2g 13h
PR unite (30g)
47

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di aws/aws-durable-execution-sdk-java

Tutte le issue di aws/aws-durable-execution-sdk-java

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.