Storage queue triggered function generates trace level log entries in app insights
See original GitHub issueWith 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:
- Created 3 years ago
- Reactions:7
- Comments:16 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mathewc I know I shouldn’t, but they’re still logged:
@pragnagopa still an issue, application insights traces full of messages related to queue polling. Which logger category (default, Host, Function, …) is controlling this logger?