azure-webjobs-sdk: Storage queue triggered function generates trace level log entries in app insights

With a queue triggered function in an app, e.g.

        public static async void ProcessRedirectClicksForGeo(
            [QueueTrigger(QueueNames.ProcessRedirectClicksForGeo)] string queuedHttpRequestString,
            [Table(TableNames.RedirectSessions)] CloudTable redirectTable,
            ILogger log,
            ExecutionContext context)

And a host.json configuration

        "logLevel": {
            "default": "Information",

Application insights continues to receive the trace level log info about the poll interval of the queue trigger, including messages like:

Poll for function 'ProcessRedirectClicksForGeo' on queue 'processredirectclicksforgeo' with ClientRequestId '3f2a0e15-f014-4537-b0bb-abbc45a4467b' found 0 messages in 3 ms.


Function 'ProcessRedirectClicksForGeo' will wait 2000 ms before polling queue 'processredirectclicksforgeo'.

The result is a large amount of data ingested in to application insights, which results in unexpectedly high costs in Azure Monitor.

There doesn’t seem to be a clear documented method of preventing these messages from being sent to application insights. Is there somewhere the documentation can be updated to specify how to resolve this?

Side note: when the default setting in logLevel in host.json is set to Information a local dev version of the function app does not produce the trace level logs.

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 7
  • Comments: 16 (3 by maintainers)

Most upvoted comments

@mathewc I know I shouldn’t, but they’re still logged: image image

@pragnagopa still an issue, application insights traces full of messages related to queue polling. Which logger category (default, Host, Function, …) is controlling this logger?