How to check actual log in Monitor of Function

osharena 86 Reputation points
2023-01-02T09:40:07.1+00:00

Hi,

To make Azure Function subscribe change feedback from Cosmos DB, I've composed Azure Function like the attachment.
I've expected that I'd be able to see real time log in "Log" of "Monitor" menu as Function invoked by changes of Cosmos DB, but I can't see any real time log that I typed other than the default "Connected!" log even if I give changes(Create/Delete/Update) to the related Cosmos DB manually.
So, I'm not being able to know my integration has been composed correctly.

Or is still there any settings that I've not realized?

275308-1.png

275329-2.png

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,705 questions
0 comments No comments
{count} vote

Accepted answer
  1. TP 118.2K Reputation points
    2023-01-03T08:41:57.643+00:00

    Hi,

    I've found that a container named "leases" was not being able to be created due to provisioning limit.
    I suppose that a container which is designated in [Collection name for leases] in Edit Trigger is necessary for Function triggering properly.
    Now, triggering works well after I created "leases" container manually.

    I was wondering what the container named "leases" means and has a role in this case because the word seems to be for very specific domain.

    My Function is receiving change feed event whenever I create or update item of Cosmos DB with Data Explorer, but it's not being able to receive change feed even if I "delete" a item from Cosmos DB. Receiving change feed when deleted is actually main purpose that I'm struggling to compose this "Cosmos DB trigger + Function" structure.

    By any chance, is there any other setting to make Function receive feed when a item is deleted from Cosmos DB?
    Or, Could you provide any other idea(it's ok even if it's not using Function) to make our system know deletion of item from Cosmos DB automatically?

    Currently change feed only gives you inserts and updates. For deletes, you can mark each item with is-deleted or similar to show that it is in soft-deleted state. Please see this article:

    https://learn.microsoft.com/en-us/azure/cosmos-db/change-feed

    The leases container is necessary for the trigger to process the change feed. Please see below for detailed explanation:

    https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/change-feed-processor?tabs=dotnet#components-of-the-change-feed-processor

    Thanks.

    -TP

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.