-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
It's hard to tell when log lines occurred within an update (or signal, or query) handler.
Describe the solution you'd like
I logged from within an update handler in the python SDK with self.logger.info
Imagining I saw this line in production, and I didn’t build the workflow, I could be confused as to why this code is getting executed. In fact, my update handler can also be called by the workflow itself, meaning it'd be nice if the context clarified whether I'm in an update handler or the main workflow.
Or I might want to grep the logs for all the times when an update/signal/query was called.
INFO:batch_orchestrator:This is my log message. ({'attempt': 1, 'namespace': 'default', 'run_id': '183ba64c-a415-492a-b569-a0e97d1a3114', 'task_queue': 'my-task-queue', 'workflow_id': 'inflate_product_prices-37acbbae-d941-4be8-8242-56f15a91d892', 'workflow_type': 'BatchOrchestrator'})
I'd love if the context or prefix listed which handler it's in somehow and perhaps whether it was a signal/update/query. In the case of an update, I'd like to see the update ID.
Additional context
Per-SDK Tickets
- Go Show update handler and ID in logging context sdk-go#1648
- .NET Show update handler and ID in logging context sdk-dotnet#351
- Python Show update handler and ID in logging context sdk-python#648
- TypeScript Show update handler and ID in logging context sdk-typescript#1532
- Java Show update handler and ID in logging context sdk-java#2237
- PHP Show update handler and ID in logging context sdk-php#512
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request