feat: load plugins dynamically from Lambda layers - #606
Conversation
Codex AI review[P1] Package OTel runtime dependencies in the layer — The published OTel JAR is thin, but the instructions package only that JAR. Dynamic creation requires its OpenTelemetry SDK/exporter dependencies, which the ADOT agent does not expose to the application class loader, causing cold-start linkage failures. Package the runtime dependency closure in [P2] Avoid rediscovering plugins when copying configuration —
[P3] Reject provider names containing commas — A provider name containing Reviewed commit |
| * Gets the plugin runner that dispatches lifecycle events to registered plugins. | ||
| * | ||
| * <p>Returns a no-op runner if no plugins were registered via the builder. | ||
| * <p>Returns a no-op runner if no plugins were registered via the builder or loaded dynamically. |
There was a problem hiding this comment.
nit: This comment is wrong. If we're returning a noOp runner then it means that no plugins were loaded dynamically
There was a problem hiding this comment.
if env var is empty and plugins are specified in DurableConfig.Builder, a real runner will be created.
Claude AI reviewReview: feat: load plugins dynamically from Lambda layersI reviewed the full SHA-anchored diff ( No actionable correctness, compatibility, or lifecycle findings. The loader is solid on the points that matter here:
Residual risk (non-blocking)
Reviewed commit |
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue Link, if available
Closes #605
Description
DurableExecutionPluginProviderSPI discovered withServiceLoaderwhenDURABLE_EXECUTION_PLUGINSis set.DurableConfig.withPlugins(...); both sources remain additive.otel-invocationandotel-executionproviders forInvocationOtelPluginandExecutionOtelPlugin.Demo/Screenshots
Not applicable; this is SDK configuration and plugin discovery behavior.
Checklist
Testing
Unit Tests
Yes. Added loader coverage for ordering, additive duplicate types, allow-list behavior, malformed configuration, discovery failures, compatibility validation, and plugin creation failures. Added provider tests for both OTel plugins.
Integration Tests
Yes. Added lifecycle coverage confirming dynamically loaded and explicitly configured plugins both receive events.
Also ran
mvn clean installsuccessfully across all reactor modules.Examples
No new example was required. The configuration guide and OTel plugin README now include Lambda layer and environment-variable examples.