Add structured logging to ImageBuilder
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- devops, observability-sre
Research direction
Start by locating the ImageBuilder entry point and reviewing its current Microsoft.Extensions.Logging usage. Then inspect how pipeline jobs publish artifacts and compare the proposed Serilog and NLog approaches. Done means concise console output, one structured JSON log per invocation, and one uploaded log artifact per pipeline job.
Written by the indexing model from the issue text.
Description
Adding structured logging to ImageBuilder would allow us to analyze log outputs and operate on log data using jq or other tools.
I propose that we split ImageBuilder's logging into two components:
- High-level console logging that is concise (fits on ~one terminal screen) and easily parsable by humans and LLMs.
- Detailed structured logging in json that is output to a file and published as a pipeline artifact. One log per ImageBuilder invocation. Put each log file into one folder and upload one log artifact per pipeline job.
Microsoft.Extensions.Logging does not have file logging support natively. See https://github.com/dotnet/runtime/issues/59322. There are a couple libraries that can provide this functionality through M.E.Logging.Abstractions (using ILogger) - both are popular and in active development:
NLog version 6 fully supports Native AOT/trimming so I lean towards that one.
- Dominant language
- C#
- Stars
- 182
- Forks
- 67
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 15
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/docker-tools
-
area-dockerfiles up-for-grabs
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dotnet/docker-tools#2080 ·
Maintainers usually reply within 1 day
-
area-infrastructure
Difficulty 5/5 Over a week Newbie friendliness 35/100
dotnet/docker-tools#2240 ·
Maintainers usually reply within 1 day
-
Rework container image rebuildsMay be free again @lbussell claimed this 80 days ago, and no pull request is open. Openarea-infrastructure
dotnet/docker-tools#2166 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
image-info.json's `commitUrl` is incorrect when manifest is not in repo rootMay be free again @lbussell claimed this 82 days ago, and no pull request is open. Openarea-infrastructure
dotnet/docker-tools#2165 · 1 assignee ·
Maintainers usually reply within 1 day
-
Use image annotations to split public and internal EOL lifecycle annotationsMay be free again @lbussell claimed this 75 days ago, and no pull request is open. Openarea-infrastructure
dotnet/docker-tools#2153 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in dotnet/docker-tools
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
AvaloniaUI/Avalonia#22323 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
microsoft/onnxruntime-genai#2633 ·
Maintainers usually reply within 1 day
-
Not reproducible
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
microsoft/fluentui-blazor#5350 · 4 comments ·
Maintainers usually reply within 1 day
-
python triage
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
microsoft/semantic-kernel#14491 ·
Maintainers usually reply within 2 days
-
area:jobads-cv FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1878 ·
Maintainers usually reply within 1 day