Azure Functions binding to Cosmos DB not triggering on document updates
I've tried everything I can think of but I'm relatively new to this, so bear with me. I have an Azure Function that is set up to trigger whenever a document is created or updated in my Cosmos DB collection. The function was working perfectly until I recently updated the Azure Functions core tools to version 4.x. Now, it only triggers on document creation but fails to trigger on updates. I have double-checked the trigger configuration in the `function.json` file: ```json { "bindings": [ { "type": "cosmosDBTrigger", "name": "documents", "databaseName": "MyDatabase", "collectionName": "MyCollection", "connectionStringSetting": "CosmosDBConnection", "leaseCollectionName": "leases", "createLeaseCollectionIfNotExists": true } ] } ``` I also verified that the documents I am updating are in the correct format and the changes are correctly written back to the Cosmos DB. I have tried to add logging within the function to see if it is even reaching the update event, but there are no logs being produced when I update a document. I considered the possibility of the trigger not recognizing updates due to the way I am updating the documents. I am using the following code snippet to update the documents: ```csharp var client = new CosmosClient(connectionString); var container = client.GetContainer("MyDatabase", "MyCollection"); var response = await container.UpsertItemAsync(myDocument); ``` Is there a specific setting or requirement that I might have missed with the new version of Azure Functions? Any insights or potential debugging steps would be appreciated! Am I approaching this the right way? Am I missing something obvious?