Azure / Azure/azure-functions-host
Application Insights not recognising logLevel settings in host.json (Reopening of #5250)
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
See #5250
Same thing, but with NodeJS.
I'm facing idle cost of 50 USD/Day for meaningless trace level logs the likes of:
```
Request successfully matched the route with name 'FooBar' and temaplate '/foobar'
Host lock lease acquired by instance ID '000000000000000000000000A45F81BF'.
Executed 'Functions.FooBar' (Succeeded,...-2e3b-43cd-8e25-02c6fb974707, Duration=7ms)
Posting invocation id:f1ec9d88-2e3b-43cd-8...rkerId:698e2cd8-1c16-4aac-b3b1-4874ceb4c660
Sending invocation id:f1ec9d88-2e3b-43cd-8e25-02c6fb974707
```
Configuration was set to:
```
"logging": {
"logLevel": {
"default": "None"
},
```
Function statically returns `Hello World`:
```
module.exports = async function (context, req) {
return context.res.body = "Hello World"
}
```
Each HTTP Request triggers 5 lines of TRACE level entries quickly piling up to GB worth of logIngestion in a day with just basic WebTest monitoring. None of those lines should've been logged with `None` set as level.
It didn't matter much what I set, I always got Azure Internal spam at a very high price tag for log ingestion.
I'd say #5250 still applies and is an issue today.
Full Config:
```
{
"version": "2.0",
"logging": {
"fileLoggingMode": "never",
"logLevel": {
"default": "None"
},
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[2.*, 3.0.0)"
},
"extensions": {
"http": {
"routePrefix": ""
}
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.