[Bug]: enabling both OTel views is accepted without mutual-exclusion validation
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- java
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Java
- Estrellas
- 28
- Forks
- 13
- Merge medio
- 2 d 8 h
- PR fusionados (30 d)
- 40
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aws/aws-durable-execution-sdk-java
-
bug pkg:sdk
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
aws/aws-durable-execution-sdk-java#773 ·
Los mantenedores suelen responder en 1 día
-
documentation pkg:sdk
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
aws/aws-durable-execution-sdk-java#645 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
aws/aws-durable-execution-sdk-java#300 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: root handler instrumentation misses the canonical OTel execution contextPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoneeds-triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 40/100
aws/aws-durable-execution-sdk-java#770 ·
Los mantenedores suelen responder en 1 día
-
[Feature]: Propagate per-operation trace context for chained invokesPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoenhancement needs-triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
aws/aws-durable-execution-sdk-java#764 ·
Los mantenedores suelen responder en 1 día
Todos los issues de aws/aws-durable-execution-sdk-java
Issues similares
-
component/operate kind/feature-request
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Forge coverage prompts carry text the agent cannot act onPosiblemente ocupada @graalvmbot la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
oracle/graalvm-reachability-metadata#10572 ·
Los mantenedores suelen responder en 1 día
-
[CI] Core CI doesn't run for changes to amoro-format-lance (and amoro-web)Posiblemente ocupada @MarkAlex1234 la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
area/docs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día