[Bug]: OTel API version mismatch lets NoSuchMethodError escape PluginRunner
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 6/10/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- aws, java
- Lĩnh vực
- backend, observability, testing
Hướng nghiên cứu
Start with otel-plugin/src/main/java/software/amazon/lambda/durable/otel/OtelPluginSupport.java and sdk/src/main/java/software/amazon/lambda/durable/plugin/PluginRunner.java, then run the supplied B1Probe with OTel API/context 1.66.0 and 1.49.0. Done means the older-API case is safely diagnosed or contained, compatible tracing still works, regression and control coverage exist, and plugin failure does not block healthy plugins or the handler.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Expected Behavior
An incompatible OpenTelemetry agent/API combination should produce a clear compatibility diagnostic or disable the affected instrumentation without a nonfatal linkage error escaping the plugin boundary and failing the customer invocation. Compatible configurations should continue to trace normally; fatal JVM failures need their existing separate handling.
Actual Behavior
The global-provider path calls GlobalOpenTelemetry.isSet(). If an older OpenTelemetry API is the class visible to the plugin, that method is unavailable and throws NoSuchMethodError. The published PluginRunner catches Exception, so this Error escapes.
Using the real plugin and runner, OTel API 1.66.0 returned normally; API 1.49.0 placed first on the classpath produced java.lang.NoSuchMethodError: boolean io.opentelemetry.api.GlobalOpenTelemetry.isSet() outside PluginRunner.onInvocationStart. The older API models agent/classloader version skew; this probe did not deploy an actual Java agent.
Steps to Reproduce
- Resolve
software.amazon.lambda.durable:aws-durable-execution-sdk-java-plugin-otel:2.2.1and its dependencies. - Compile
B1Probebelow in the indicated package. The package placement permits the test to mark the agent auto-configuration path as installed; this is a reproduction fixture, not recommended application code. - Run with the normal dependencies (OTel API/context 1.66.0 in the tested resolution). Observe
result=returned. - Resolve
io.opentelemetry:opentelemetry-api:1.49.0andio.opentelemetry:opentelemetry-context:1.49.0, place those two jars before the normal dependency classpath, and run the same compiled class. Observeresult=escaped_plugin_runnerand NoSuchMethodError. No AWS calls are made.
Reproduction code
package software.amazon.lambda.durable.otel;
import java.time.Instant;
import java.util.List;
import io.opentelemetry.api.GlobalOpenTelemetry;
import software.amazon.lambda.durable.plugin.InvocationInfo;
import software.amazon.lambda.durable.plugin.PluginRunner;
public class B1Probe {
public static void main(String[] args) {
OtelPluginAutoConfigurationState.markInstalled();
var plugin = new ExecutionOtelPlugin(OtelPluginConfig.builder().enableMdc(false).build());
var runner = new PluginRunner(List.of(plugin));
boolean hasMethod = java.util.Arrays.stream(GlobalOpenTelemetry.class.getMethods()).anyMatch(m -> m.getName().equals("isSet"));
try {
runner.onInvocationStart(new InvocationInfo("req", "arn:aws:lambda:us-west-2:123456789012:function:probe:1/durable-execution/probe/id",true,Instant.now()));
System.out.println("{\"apiHasIsSet\":"+hasMethod+",\"result\":\"returned\"}");
} catch (Throwable e) {
System.out.println("{\"apiHasIsSet\":"+hasMethod+",\"result\":\"escaped_plugin_runner\",\"errorType\":\""+e.getClass().getName()+"\",\"error\":\""+e.getMessage().replace("\"","\\\"")+"\"}");
}
}
}
SDK Version
Core SDK / OTel plugin 2.2.1; OTel API/context 1.66.0 control and 1.49.0 mismatch. Main rechecked at 78574e3051aac9b5ca00a0c1fd2b91eab72a9e15.
Java Version
Corretto 25.0.4.1
Is this a regression?
Unknown; no last-known-good version has been established.
Additional Context
Sources: global provider compatibility path and Exception-only plugin dispatch catch. This does not assert that every older agent version must be supported; it requests safe handling of an incompatible visible API.
The open PR #721 includes plugin lifecycle/error-isolation work and is relevant to the containment part. This issue tracks the concrete API-skew regression and supported-configuration behavior.
Acceptance criteria
- Guard/remove calls to APIs that may be absent, or safely detect and explain the required API/agent version before calling them.
- Contain nonfatal linkage failures from plugin hooks/factories without blanket-catching fatal JVM errors.
- Add the older-API regression and compatible-version control, then test the supported real agent combinations.
- Document version requirements and ensure a failed plugin does not prevent healthy plugins or the handler from completing.
- Ngôn ngữ chính
- Java
- Star
- 28
- Fork
- 14
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 47
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aws/aws-durable-execution-sdk-java
-
documentation pkg:sdk
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
aws/aws-durable-execution-sdk-java#645 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
aws/aws-durable-execution-sdk-java#300 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement needs-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
aws/aws-durable-execution-sdk-java#779 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: root handler instrumentation misses the canonical OTel execution contextCó thể đã có người làm @zhongkechen đã nhận 5 ngày trước. Đang mởneeds-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 40/100
aws/aws-durable-execution-sdk-java#770 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature]: Propagate per-operation trace context for chained invokesCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởenhancement needs-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
aws/aws-durable-execution-sdk-java#764 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của aws/aws-durable-execution-sdk-java
Issue tương tự
-
Mend: dependency security vulnerability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
opfab/operatorfabric-core#10653 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
GeminiUtil placeholder user turn ("Continue output. DO NOT look at this line ...") is flagged by prompt injection filtersCó thể đã có người làm @innoprej đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Broken links in the docsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
salesforce/multicloudj#667 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
MetricsHub/winrm-java#202 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ASCN/cBioPortal Pipelines/cBioPortal
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
mskcc/smile-server#1990 ·