How you correctly send logs to Stackdriver from Google Workflows?
Based on the documentation I've created this:
- logStep1:
call: sys.log
args:
text: "Step 2 launched accordingly"
severity: INFO
The workflow launches and finishes as expected, but, when I go into stackdriver to look for my log entry it doesn't show, only "audited logs" the rest of them is no where to be found.
Google docs states certain steps to look for those logs, but even the the: resource.type="workflows.googleapis.com/Workflows"
is marked as incorrect in the stackdriver filter.
I expected to see my text payload under a blue icon (INFO) entry, but alas, is not there.
Did I missed something in my log step?
Resources used: https://cloud.google.com/workflows/docs/troubleshooting#sending-logs
After re-reading the documentation it states that it requires Log Writer permissions, I thought that permissions will be inherited from the caller, but it is not the case, once has to create an specific service account with all the required permissions, including Log Writer or Log Admin to be able to send information to the Stackdriver event flow.
So, to solve this issue check:
I've tested this several times and it works.