Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.94k stars 441 forks source link

Worker log improvements #4116

Open mathewc opened 6 years ago

mathewc commented 6 years ago

Currently some multi-line worker errors are emitted as multiple single lines in Kusto. For example, an error like:

Worker f4645283-bd07-4b82-8de9-f6c657dd2f97 uncaught exception:  TypeError: Cannot read property 'release' of null
    at ConnectionPool.release (D:\home\site\wwwroot\xxx\node_modules\mssql\lib\base.js:197:15)
    at Request.tds.Request.err [as userCallback] (D:\home\site\wwwroot\xxx\node_modules\mssql\lib\tedious.js:608:25)
    at Request._this.callback (D:\home\site\wwwroot\xxx\node_modules\tedious\lib\request.js:60:27)
    at Connection.endOfMessageMarkerReceived (D:\home\site\wwwroot\xxx\node_modules\tedious\lib\connection.js:1906:20)
    at Connection.dispatchEvent (D:\home\site\wwwroot\xxx\node_modules\tedious\lib\connection.js:992:38)
    at Parser.<anonymous> (D:\home\site\wwwroot\xxx\node_modules\tedious\lib\connection.js:813:18)
    at emitOne (events.js:116:13)
    at Parser.emit (events.js:211:7)
    at Parser.<anonymous> (D:\home\site\wwwroot\xxx\node_modules\tedious\lib\token\token-stream-parser.js:54:15)
    at emitOne (events.js:116:13)
Worker f4645283-bd07-4b82-8de9-f6c657dd2f97 exited with code 1

shows up in our Kusto logs as 11 separate lines. That makes it hard to search through errors. See ICM #73561875 for an example occurrence including queries.

fabiocav commented 5 years ago

Moving this to triaged issues for validation

@brettsam / @pragnagopa may have the details