[Bug]: enabling both OTel views is accepted without mutual-exclusion validation
Maintainer thường phản hồi trong vòng 1 ngày
Đá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
- 35/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
- backend-api-design, observability
Hướng nghiên cứu
Start with DurableConfig.java, DynamicPluginLoader.java, and PluginRunner.java to trace explicit, dynamic, and mixed registration, then inspect ExecutionOtelPlugin.java and InvocationOtelPlugin.java. Add focused validation and lifecycle tests for both registration orders, suspension/resume, success, failure, raw exports, and context restoration. Done means conflicting views are rejected before telemetry starts while valid combinations remain supported.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Expected Behavior
At most one durable OTel view should be active for a handler invocation. InvocationOtelPlugin and ExecutionOtelPlugin are alternative views of the same execution and must not run together.
Reject the unsupported combination during configuration/registration with a clear diagnostic naming both views and explaining that the caller must keep one. Preserve valid single-view configurations and unrelated instrumentation plugins.
Actual Behavior
The current registration path accepts both built-in OTel views:
DurableConfig.Builder.withPlugins(...)accepts both instances; it checks null entries but does not enforce OTel-view exclusivity.DynamicPluginLoaderloads each requested provider and appends explicitly configured plugins. It rejects repeated provider names, butotel-invocationandotel-executionare different valid names.PluginRunnerretains the complete list and invokes every plugin's hooks in registration order. Each OTel view manages its own Workflow/Invocation spans and operation-parent model, so combining them can emit duplicate telemetry and competing context/log-correlation state.
Source inspected at d3208f2e759d3c79e84b46f53c2eb11fb7fe4c09:
- Explicit registration accepts the plugin list.
- Dynamic registration combines both paths; duplicate-name checks are insufficient.
- Runner retains all instances and dispatches every hook.
- Execution view materializes Workflow; Invocation view also materializes Workflow.
Steps to Reproduce
This report is based on source inspection. The following validation recipe has not been executed for this report:
-
Configure a recording OpenTelemetry provider with an in-memory exporter and sampling enabled; avoid an explicit upstream
Sampled=0suppressing the spans under test. -
Register both plugins explicitly:
DurableConfig.builder() .withPlugins(new InvocationOtelPlugin(), new ExecutionOtelPlugin()) .build(); -
Run a handler containing one durable step through terminal completion. Observe that registration accepts both views and both receive hooks. Capture raw exported spans before backend deduplication.
-
With the providers available on the class path, repeat using:
DURABLE_EXECUTION_PLUGINS=otel-invocation,otel-execution -
Repeat with one view explicit and the other selected through the environment, then reverse their order.
Expected: a clear configuration diagnostic prevents both views from running. Current source accepts the combination; duplicate emission and context/MDC restoration should be pinned by focused runtime regression tests.
SDK Version
Current main source at d3208f2e759d3c79e84b46f53c2eb11fb7fe4c09.
Java Version
Not recorded: source inspection only; no new Java runtime reproduction was run for this report.
Is this a regression?
Unknown; no last working version with OTel-view exclusivity enforcement has been established.
Last Working Version
None identified.
Acceptance Criteria
- Document that the two durable OTel views are mutually exclusive, including how to choose one.
- Validate the explicit, dynamic/environment, and mixed registration paths after resolving the effective configuration. Cover both registration orders.
- Reject the combination before either view begins emitting telemetry, with a diagnostic naming the conflicting views. If a different fail-safe policy is selected, document and test it; silently running both is not acceptable.
- Keep zero-OTel-plugin configurations, either single view, and a single OTel view combined with unrelated plugins valid.
- Use reusable exclusivity/registration metadata or an equivalent mechanism that does not require the core SDK to depend on OTel implementation classes. Checking duplicate provider names alone cannot reject two distinct views.
- Test raw exports and context restoration: no duplicate Workflow/Invocation records from competing views, no conflicting operation parents, and no ended or other-view span left active for user logs/spans.
- Cover the initial invocation and suspension/resume, including success and failure, without changing durable operation sequencing or replay behavior.
- Apply the same constraint to any factory-based registration introduced by the plugin lifecycle migration; changing instance lifetime does not make the two views compatible.
Additional Context
- Existing cross-SDK report: https://github.com/aws/aws-durable-execution-sdk-python/issues/652
- This is a configuration-validation defect and does not require LMI or concurrent Lambda invocations.
- Python #652 includes a Python-specific attach/detach ordering failure. This report does not claim that exact failure was reproduced in this language; validate context cleanup through this SDK's own lifecycle.
- Align the diagnostic, supported combinations, documentation, and conformance expectations across JavaScript, Java, and Python.
- Ngôn ngữ chính
- Java
- Star
- 28
- Fork
- 13
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 44
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
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 Có pull request liên kết đang mở hoặc đã được merge. Đ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ự
-
[destination-snowflake] Custom domains rejected unlike source connectionsCó thể đã có người làm @kuza55 đã nhận hôm nay. Đang mởautoteam community connectors/destination/snowflake team/use
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area-dashboard
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
component/operate kind/feature-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Forge coverage prompts carry text the agent cannot act onCó thể đã có người làm @graalvmbot đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
oracle/graalvm-reachability-metadata#10572 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bundled migration plansĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
IBM/sample-app-mod#55 ·