I am currently learing how to use queues in GCP. I currently have a setup similar to this tutorial. https://medium.com/@rogiervandenberg/google-cloud-task-queues-on-gcp-with-google-cloud-functions-22eb80fe34ba
[graphic from site above which shows the main idea]
I want to change this to track failed functions so I can follow up on them to fix the crashes, so the new scheme will look something like this.
None of my searching has found a way to find anything about dead letter topics for cloud tasks or a way to be notified, but it seems like a obvious feature to have.
The only idea I have had so far is to make the function responsible for logging itself like below, but that seems clunkier then is typical of GCP.
try {
// do stuff
} catch (error) {
console.error("my_function() crashed with input: " + input)
throw error
}