[Feature]: Add a unified OtelPlugin factory with execution defaults
Maintainer thường phản hồi trong vòng 1 ngày
Đá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
- 25/100
- Loại issue
- Tính năng
- Độ 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
Hướng nghiên cứu
Start in the otel-plugin module and read the existing ExecutionOtelPlugin.factory(...) and InvocationOtelPlugin.factory(...) implementations, then inspect the DurableExecutionPluginFactory and ServiceLoader registration paths. Add the selector and otel provider while preserving factory metadata and configuration paths. Done means the acceptance criteria pass, including lifecycle isolation, compatibility, telemetry, examples, and documentation.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What would you like?
Add a single public OtelPlugin entry point for selecting the OTel view, with execution mode as the default and invocation mode as an explicit choice. Users should be able to import one name and register a factory, while existing registration APIs continue to work.
Illustrative API, using factory to make the return value explicit:
import software.amazon.lambda.durable.DurableConfig;
import software.amazon.lambda.durable.otel.OtelPlugin;
var execution = OtelPlugin.factory();
var invocation = OtelPlugin.factory(OtelPlugin.Mode.INVOCATION);
// Register one selected factory with DurableConfig:
var config = DurableConfig.builder().withPlugins(execution).build();
Support explicit execution selection and the existing OtelPluginConfig and application-owned SdkTracerProviderBuilder configuration paths as well.
Also add DURABLE_EXECUTION_PLUGINS=otel as the default execution entry point. Keep otel-execution and otel-invocation working with their existing meanings.
Possible Implementation
Implement the new entry point in otel-plugin as a small selector over ExecutionOtelPlugin.factory(...) and InvocationOtelPlugin.factory(...). Return the selected factory directly where possible, retaining its exclusive-group metadata and diagnostic identity.
The current SDK registers DurableExecutionPluginFactory objects. The new API must preserve that lifecycle: the SDK supplies InvocationInfo and creates a fresh plugin for each invocation; provider/environment state retains its existing lifetime. Do not share an invocation plugin between concurrent executions or replace the factory contract with a no-argument plugin instance constructor.
Register a ServiceLoader provider named otel that delegates to the execution factory, including its exclusivity metadata. Keep the existing providers intact. Default construction continues to use the ADOT/global-provider integration; custom provider setup passes through to the selected implementation.
Is this a breaking change?
No. Preserve all public APIs supported by the target release, including existing factory overloads, configuration types, package paths, and provider names. Retain source and binary compatibility. The new entry point must not change existing trace hierarchy, span identities, sampling, logging, or replay behavior.
Does this require an RFC?
No. This is an additive API over existing implementations; final overload naming can be settled during API review.
Additional Context
Acceptance criteria:
- Default and explicit execution selection match the existing execution factory; invocation selection matches the existing invocation factory. Reject invalid explicit mode values.
- Configuration reaches the selected factory unchanged, including global-provider and custom-builder paths.
- Existing factory registration and ServiceLoader entry points continue to work;
otelloads execution mode without handler-side OTel imports or registration. - Preserve exclusive-view validation when combining new and existing entry points, including explicit/environment combinations. Related wrapper metadata issue: https://github.com/aws/aws-durable-execution-sdk-java/issues/856.
- Exercise the public API through an initial invocation and suspension/resume, and reuse one factory across concurrent invocations to verify isolation and equivalent telemetry.
- Update Java examples and documentation for both views and environment loading. Explain that no handler-side setup still requires the plugin JAR and configured ADOT/provider/exporter; installing the package alone does not enable instrumentation.
Coordinate the API semantics and cross-language documentation with the Python and JS implementations.
Related SDK issues
- Ngôn ngữ chính
- Java
- Star
- 28
- Fork
- 18
- Merge trung bình
- 16 giờ 53 phút
- Pull request đã merge (30 ngày)
- 63
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
-
bug pkg:conformance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aws/aws-durable-execution-sdk-java#844 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
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
-
bug pkg:telemetry
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 54/100
aws/aws-durable-execution-sdk-java#877 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: ctx.map returns MapResult items as LinkedHashMap instead of the declared result typeCó thể đã có người làm @pcbeingused333 đã nhận 1 ngày trước. Đang mởbug pkg:sdk
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
aws/aws-durable-execution-sdk-java#870 ·
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ự
-
needs-area-label
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement Java macOS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
freerouting/freerouting#1079 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/maven-enforcer#1074 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Gradle liquibaseDiffChangelog drops jhi_date_time_wrapperCó thể đã có người làm @mraible đã nhận hôm nay. Đang mởarea: triage theme: undefined
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
jhipster/generator-jhipster#35998 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
openai/openai-java#1337 ·
Maintainer thường phản hồi trong vòng 1 ngày