Azure / Azure/azure-functions-host

Worker log improvements

Open
#4,116 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

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. (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. (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.

Contributor guide

Open the contributing guide

Research direction

Start with the multiline worker error example and ICM #73561875, including its queries, to reproduce how the message appears in Kusto. Trace the worker logging path and verify that the complete error is emitted as one searchable log entry rather than 11 separate lines.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, observability-sre
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.