[Bug]: Add missing OTEL_INSTRUMENTATION_EXECUTORS_ENABLED setting for Java OTel

未关闭 适合新手
#844 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
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 分钟
30 天内合并 PR
63

环境准备

从这里开始

  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 摘要。