Make logging-scope handling consistent across the logging integrations
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- csharp
- Domain
- backend-api-design
Research direction
Read linked issues #5635, #5222, #3081, and #4882 to understand the behavior and decisions already in play. The issue asks for consistent scope handling across MEL, Serilog, structured logs, and documentation, but leaves the shared behavior undecided. Start by resolving the listed decisions with maintainers; done means the integrations and docs follow an agreed behavior.
Written by the indexing model from the issue text.
Description
Each logging integration turns logging-scope state (ILogger.BeginScope in Microsoft.Extensions.Logging, LogContext in Serilog) into Sentry data in its own way. Structured logs don't use it at all yet, and the docs don't explain it.
| Area | Issue | Status |
|---|---|---|
| MEL and Serilog behave differently | #5635 | Different value handling, read at different times, different opt-outs, and different behaviour in global mode. |
BeginScope state on structured logs |
#5222 | Not implemented. The plan from 2026-10-20 is an opt-in IncludeScopes option on SentryLoggingOptions, off by default because ASP.NET Core opens a logging scope for every request. |
Docs for passing data with BeginScope |
#3081 | The MEL guide mentions BeginScope only under tag filters. Best written once the behaviour above settles. |
Decisions to make once, for every integration
- Which values to keep: MEL keeps only string values, while Serilog calls
ToString()on every property. - When to read them: MEL copies them into the Sentry scope when
BeginScopeis called, while Serilog readsLogContexteach time an event is captured. - How to opt out: MEL has the public
SentryOptions.SentryScopeStateProcessor, while Serilog's processor is internal. - Global mode (MAUI, desktop): MEL's
PushScopedoes nothing there, but the Serilog processor still runs. - Precedence: where logger-scope attributes sit relative to attributes on the Sentry scope (#4882).
- Dominant language
- C#
- Stars
- 775
- Forks
- 262
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 118
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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 getsentry/sentry-dotnet
-
chore: remove stale IL3050/IL3053 workaround from the iOS samplePossibly taken A pull request linked to this issue is open or already merged. OpenState: Needs Discussion
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
getsentry/sentry-dotnet#6071 · 1 comment ·
Maintainers usually reply within 1 day
-
Heap dumps: every SDK shutdown logs "Error waiting for GarbageCollectionMonitor task to complete"Possibly taken @pcbeingused33 claimed this today. OpenState: Needs Discussion
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
getsentry/sentry-dotnet#6039 · 3 comments ·
Maintainers usually reply within 1 day
-
.NET Platform: Android Task
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
getsentry/sentry-dotnet#6020 · 3 comments ·
Maintainers usually reply within 1 day
-
Move the Blazor WebAssembly sample off the deprecated DevServerPossibly taken A pull request linked to this issue is open or already merged. Open.NET Framework: Blazor
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
getsentry/sentry-dotnet#5906 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Docs MSBuild Needs Docs Update
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getsentry/sentry-dotnet#5691 · 1 comment ·
Maintainers usually reply within 1 day
All issues in getsentry/sentry-dotnet
Similar issues
-
In-car displays show 0 km/h and P while the AV drivesPossibly taken @bazilinskyy claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
bazilinskyy/coupled-sim#366 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BaryoDev/umbraco-pwa#196 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
microsoft/fluentui-blazor#5688 ·
Maintainers usually reply within 1 day
-
bug flaky lsp-transport small
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day