I encountered a situation in which one of my Firestore docs changed unexpectedly.
I have a Firebase Cloud Function which listens to those doc updates. I have a trace id of a log from that function. Is it possible to find out which userID or firebase function updated that doc on that specific event?
By default a background Cloud Function triggered by an update in Firestore does not know which user updated the document.
The only way to know that would be to have a field in the document containing the last user who updated the document. In other words, in the front-end code you would get the user uid and add it to the data/payload object passed to the updateDoc()
method.