question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Storage queue triggered function generates trace level log entries in app insights

See original GitHub issue

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

        [FunctionName("ProcessRedirectClicksForGeo")]
        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.

and

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.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
otecfurascommented, Dec 3, 2021

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

1reaction
otecfurascommented, Dec 3, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Storage queue triggered function generates trace level log ...
Application insights continues to receive the trace level log info about the poll interval of the queue trigger, including messages like: Poll ...
Read more >
Configure monitoring for Azure Functions
Learn how to connect your function app to Application Insights for monitoring and how to configure data collection.
Read more >
Azure function Table binding producing a lot of logging noise
The host.json code you have given will log/capture the live data coming during the request and response. As @AnandSowmithiran said, there is ...
Read more >
Azure Application Insights — How not to burn money using it
Also, setting the Log Level for Function to "Error" causes only failed requests to show up within Application Insights, ...
Read more >
Azure function verbose trace logging to Application Insights
You have a lot of control over your log levels for App Insights in Functions, but you don't use the tracing element for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found