sdk-java icon indicating copy to clipboard operation
sdk-java copied to clipboard

Allow context propagators & interceptors to populate ActivityExecutionContext

Open robzienert opened this issue 4 years ago • 2 comments

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.

robzienert avatar Jun 03 '21 16:06 robzienert