Golang context not propagated from workflow to activities when using propagators

I am using golang context propagators to pass in some information from my go code to the workflow.
I followed Passing Context with Temporal​ | Spiral Scout's Company News to get started.
In the workflow event history, I do see the passed values present under header.fields in WorkflowExecutionStarted event. But, nothing in the activity related events.
I had added logs in all 4 (Inject, InjectFromWorkflow, Extract, ExtractToWorkflow) methods while implementing workflow.ContextPropagator interface. I only see logs from Inject function.

It is being injected from go context into workflow headers, but not into workflow context by the way.

Never mind, it was my mistake not passing the propagators correctly in our own written abstractions. Thanks!

1 Like