We use jwt for authentication which means that workflows and activities need to carry around jwt token of the function that triggers them.
I tried adapting the sample to no avail. then tested the sample and it doesn’t work correctly.
logs below;
|2020-07-13T02:04:02.202+0100|INFO|internal/internal_worker.go:1029|Started Worker|{"Namespace": "default", "TaskQueue": "ctx-propagation", "WorkerID": "82087@moh-abks-mbp.lan@"}|
|---|---|---|---|---|
|2020-07-13T02:04:11.615+0100|DEBUG|internal/internal_event_handlers.go:478|ExecuteActivity|{"Namespace": "default", "TaskQueue": "ctx-propagation", "WorkerID": "82087@moh-abks-mbp.lan@", "WorkflowType": "CtxPropWorkflow", "WorkflowID": "ctx-propagation_fdcb90bf-a3db-4a5f-9262-56aa0e4e9d5b", "RunID": "a675a7cd-6ea9-4a2c-8efd-692290e38c4d", "ActivityID": "5", "ActivityType": "SampleActivity"}|
|2020-07-13T02:04:11.669+0100|INFO|ctxpropagation/workflow.go:29|context propagated to activity|{"Namespace": "default", "TaskQueue": "ctx-propagation", "WorkerID": "82087@moh-abks-mbp.lan@", "WorkflowType": "CtxPropWorkflow", "WorkflowID": "ctx-propagation_fdcb90bf-a3db-4a5f-9262-56aa0e4e9d5b", "RunID": "a675a7cd-6ea9-4a2c-8efd-692290e38c4d", "": ""}|
|2020-07-13T02:04:11.669+0100|INFO|ctxpropagation/workflow.go:30|Workflow completed.|{"Namespace": "default", "TaskQueue": "ctx-propagation", "WorkerID": "82087@moh-abks-mbp.lan@", "WorkflowType": "CtxPropWorkflow", "WorkflowID": "ctx-propagation_fdcb90bf-a3db-4a5f-9262-56aa0e4e9d5b", "RunID": "a675a7cd-6ea9-4a2c-8efd-692290e38c4d"}|