azure-functions-host icon indicating copy to clipboard operation
azure-functions-host copied to clipboard

Handling blob receipts and the constant GetBlobProperties requests

Open PleaseStopAsking opened this issue 2 years ago • 4 comments

What language does your question apply to? (e.g. C#, JavaScript, Java, All)

Using C# with Azure.Storage.Blobs v12.10.0 but this question is generic and not specific to a specific language

Question

As part of my Azure Policies, diagnostic settings are configured for all storage accounts that push blob logs to a Log Analytics workspace. Since implementing my blob trigger, I have seen a massive increase in the number of logs in my workspace caused by the constant blob receipt checks from the trigger. The number of logs are relative to the number of receipts requests which as of now, sits at 300k-ish an hour which is roughly $350 a month.

To mitigate this, the options I see available are to exclude specific storage accounts from my Azure Policy (not ideal) or to make changes to my function but what that change would entail is unclear. I am looking for guidance on what sort of code changes might be available.

PleaseStopAsking avatar Jun 01 '22 14:06 PleaseStopAsking

Hi @PleaseStopAsking Could you please let us know which version of Azure.Storage.Blob extension are you using? There is one additional option to use the event grid in order to avoid interactions with the storage account which is resulting in excess of logs. Let us know if that helps.

Ved2806 avatar Jun 06 '22 15:06 Ved2806

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

ghost avatar Jun 10 '22 16:06 ghost

@Ved2806 I am currently using v12.10.0 of Azure.Storage.Blobs.

PleaseStopAsking avatar Jun 13 '22 11:06 PleaseStopAsking

Hi @kshyju Do you have any inputs with this?

Ved2806 avatar Jul 19 '22 07:07 Ved2806

We resolved this issue by changing the BlobTrigger to an EventGridTrigger. This stopped the large number of transactions.

stuartdotnet avatar Aug 18 '22 00:08 stuartdotnet

Hi @PleaseStopAsking Does the experiment by stuartdotnet helping in your case?

Ved2806 avatar Oct 28 '22 13:10 Ved2806

@Ved2806 I have been unable to allocate resources to test at this time. I have instead chosen to disable diagnostics for this specific storage account only until we can revisit which will be within the next few months.

PleaseStopAsking avatar Oct 28 '22 13:10 PleaseStopAsking

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

ghost avatar Nov 01 '22 16:11 ghost