How to filter Host.Function.Console logs between user-generated and platform-generated?

Andrew Yang 0 Reputation points
2024-03-11T16:30:35.57+00:00

Our azure functions are outputting an excessive amount of logs, especially ones with Properties.Category == 'Host.Function.Console'. The vast majority of these are platform-generated, with the entire content of the message being things like:

=> AzureFunctions_FunctionName:*** AzureFunctions_InvocationId:***

or

FROM "Position" AS p

I know I can set the logLevel of Function.* or Host.* higher than Information to filter these out, but then I believe I would also lose the custom logs we manually write in our code which are put in the same category.

What's the correct way to filter these logs so that we aren't sending excessive amounts of data to application insights?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,409 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 22,441 Reputation points Moderator
    2024-03-11T21:42:09.7566667+00:00

    Andrew Yang Thanks for posting your question in Microsoft Q&A. Currently, you can only adjust log level settings in host.json or category as you described above and check out Configure log levels for more info. Unfortunately, there is no option to customize user-generated vs platform-generated logs, and this is good feedback to post it in Azure Functions feedback (others can upvote it too). Also, I will pass feedback internally with our product team.

    We have Solutions with high volume of telemetry that describes few alternatives and worth to take a look. I hope this helps and let me know if any questions.


    If you found the answer to your question helpful, please take a moment to mark it as Yes for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions.


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.