[Feature]: Add a unified OtelPlugin factory with execution defaults
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- aws, java
- 领域
- backend, observability
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Java
- 星标
- 28
- 派生
- 18
- 平均合并
- 18 小时 16 分钟
- 30 天内合并 PR
- 62
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aws/aws-durable-execution-sdk-java 的其他 Issue
-
bug pkg:conformance
难度 2/5 1-3 小时 新手友好度 76/100
aws/aws-durable-execution-sdk-java#844 ·
维护者通常 1 天内回复
-
documentation pkg:sdk
难度 1/5 1-3 小时 新手友好度 88/100
aws/aws-durable-execution-sdk-java#645 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
aws/aws-durable-execution-sdk-java#300 ·
维护者通常 1 天内回复
-
[Bug]: telemetry truncation time grows with the square of the operation count for size-limited exporters other than LambdaLogExporter可能已有人在做 @pcbeingused333 于 1 天前认领。 未关闭bug pkg:telemetry
难度 4/5 3-5 天 新手友好度 54/100
aws/aws-durable-execution-sdk-java#877 ·
维护者通常 1 天内回复
-
bug needs-triage pkg:sdk
难度 5/5 一周以上 新手友好度 35/100
aws/aws-durable-execution-sdk-java#859 ·
维护者通常 1 天内回复
查看 aws/aws-durable-execution-sdk-java 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
commons-app/apps-android-commons#7275 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 78/100
liberation-data/drivine4j#682 ·
维护者通常 1 天内回复
-
Document and enforce pull request review guidelines可能已有人在做 @dashorst 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
`Time.at(t, in: nil)` returns UTC instead of the local time (or the time zone of `t`), unlike CRuby未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
hermes-queue
难度 1/5 1 小时以内 新手友好度 72/100
chrisalunlloyd2-sudo/mindpalace#349 ·
维护者通常 1 天内回复