May 2019
Intermediate to advanced
504 pages
11h 50m
English
When we talk about custom traces, collecting Application Insights telemetry data from Azure Functions is no different from using any other .NET application. When we created our Azure Functions, we injected a TraceWriter instance into our methods. TraceWriter logs are the main source of diagnostic telemetry and is collected within an Azure Function. These log entries can be filtered according to the log level using the host.json settings:
{
"logger": {
"categoryFilter": {
"defaultLevel": "Information",
"categoryLevels": {
"Host.Results": "Error",
"Function": "Error",
"Host.Aggregator": "Information"
}
},
"aggregator": {
"batchSize": 1000,
"flushTimeout": "00:00:30"
}
},
"applicationInsights": {
"Read now
Unlock full access