temporalio / temporalio/sdk-java

Allow context propagators & interceptors to populate ActivityExecutionContext

Open
#525 2 comments 1 reaction 2 assignees View on GitHub

@robzienert is already working on this.

Since Jun 7, 2021.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.