temporalio / temporalio/sdk-java
Allow context propagators & interceptors to populate ActivityExecutionContext
@robzienert is already working on this.
Since Jun 7, 2021.
- Dominant language
- Java
- Stars
- 433
- Forks
- 249
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 26
Description
Is your feature request related to a problem? Please describe.
I'm trying to access information from a context propagator in an Activity. The current strategy is that the context propagator should create a ThreadLocal to make this data accessible from an Activity, but the ergonomics of this could be improved.
Describe the solution you'd like
Being able to access propagated context via Activity.getExecutionContext() would be have better ergonomics. In this scenario, it seems like the responsibility would still be on the ContextPropagator or interceptor to populate these values, but accessing this information from activities would be cleaner.
Describe alternatives you've considered
The existing ThreadLocal pattern works.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.