[Bug]: Add missing OTEL_INSTRUMENTATION_EXECUTORS_ENABLED setting for Java OTel

オープン 初心者向け
#844 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
aws, java

調査の方向性

まず conformance-tests-otel/template.yaml と template-long-running.yaml を確認し、次に otel-plugin/README.md の SAM と CLI のセットアップ例を確認します。両方のテンプレートと例に executor の計装設定を追加し、セットアップまたはトラブルシューティングのドキュメントで説明します。設定が文書化され、両方の Java OTel ビューに適用されていることを完了条件とします。issue ではローカルでの統合確認が報告されていますが、クラウドへの再デプロイはまだ行われていません。

索引モデルが issue の本文から書いたものです。

説明

bug pkg:conformance
Expected Behavior

In both Java OTel views, Invocation should be a child of the active ADOT Lambda handler span when that span is on the same trace:

AWS::Lambda::Function
└── durable-execution-conformance (handler)
    └── Invocation
Actual Behavior

Invocation and the handler span are siblings under AWS::Lambda::Function. The handler span runs on main, while the SDK creates Invocation on durable-exec-19 without the active handler context. This was observed across seven conformance traces, including suspension/resume.

Steps to Reproduce
  1. Deploy the Java OTel conformance handlers with AWSOpenTelemetryDistroJava:19 and the current SAM template.
  2. Run a handler in either execution or invocation view.
  3. Inspect the X-Ray parent IDs: Invocation points to the Lambda function segment instead of the ADOT handler span.
  4. Set OTEL_INSTRUMENTATION_EXECUTORS_ENABLED=true. Executor instrumentation carries the active handler context to the SDK worker thread.
SDK Version

Source inspected and locally reproduced at commit 64339d4f0e071cd841bdaf43c95a35324a3132bb (3.0.1-SNAPSHOT).

Java Version

21

Is this a regression?

Unknown; an earlier working version has not been established.

Additional Context

The deployed ADOT layer's otel-instrument wrapper defaults OTEL_INSTRUMENTATION_COMMON_DEFAULT_ENABLED to false and selectively enables instrumentation. It does not enable executor instrumentation. The Java deployment templates and plugin setup examples currently omit the required setting:

OTEL_INSTRUMENTATION_EXECUTORS_ENABLED: "true"

Please add it to:

  • conformance-tests-otel/template.yaml
  • conformance-tests-otel/template-long-running.yaml
  • The SAM and CLI setup examples in otel-plugin/README.md, with an explanation in setup/troubleshooting documentation.

The existing Invocation parent-selection logic should remain unchanged: it correctly prefers a valid same-trace active span and falls back when that context is unavailable. Context propagation must preserve that span before the helper runs. Workflow remaining under the backend execution ancestor is intentional.

Local verification used the actual ADOT layer v19 agent (2.32.0-adot-lambda1-aws). The real SDK parent assertion failed with the layer defaults and passed with executor instrumentation enabled in both views, on initial invocation and after resume. Each completed step ran only once. The 20 existing execution/invocation integration tests also passed. The setting has not yet been verified through a cloud redeployment.

主要言語
Java
スター
28
フォーク
18
平均マージ
16時間 53分
マージ済み PR(30日)
63

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws/aws-durable-execution-sdk-java のほかの issue

aws/aws-durable-execution-sdk-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。