2

I have a Cloud Run service which needs to run for more than the maximum timeout of 3600 seconds, so I'm setting up a Cloud Workflows workflow that can run it several times until it's complete. But this makes it harder to connect the logs because each Cloud Run invocation gets its own traceparent header.

Is there a way to make Cloud WorkFlows generate the trace context?

danmichaelo
  • 1,706
  • 1
  • 25
  • 30
  • 2
    Have you gone through with this [Documentation](https://dev.to/koshilife/associate-with-parent-cloud-workflows-logs-and-child-apis-logs-using-structured-logs-17b9) – Sandeep Vokkareni Apr 01 '23 at 09:39
  • Was the documentation above helpful? – Sandeep Vokkareni Apr 04 '23 at 12:55
  • Thanks, Sandeep, interesting to see that others have struggled with the same thing! The author uses `workflow_execution_id` as a label, which is a fine workaround for grouping log messages, similar to what I ended up with myself, but I would still prefer to use standard tracing since it's a standard with widespread tooling support. – danmichaelo Apr 19 '23 at 18:43
  • I had a similar scenario and went with [cloud batch](https://cloud.google.com/batch/docs/create-run-basic-job#gcloud) running same container I had running in Cloud Run, did you try it? – mesmacosta May 17 '23 at 23:22
  • Thanks, @mesmacosta, I didn't want to introduce VMs to this project, but I've tried Cloud Batch and agree that it's a nice service :) – danmichaelo May 22 '23 at 07:41

0 Answers0