Skip to content

[Diagnostics] Add EventPipe Buffer Mode and EventFilter and update Collect-Linux - #55628

Draft
mdh1418 wants to merge 8 commits into
dotnet:mainfrom
mdh1418:eventpipe-non-lossy-buffering-docs
Draft

[Diagnostics] Add EventPipe Buffer Mode and EventFilter and update Collect-Linux#55628
mdh1418 wants to merge 8 commits into
dotnet:mainfrom
mdh1418:eventpipe-non-lossy-buffering-docs

Conversation

@mdh1418

@mdh1418 mdh1418 commented Aug 21, 2026

Copy link
Copy Markdown
Member

Summary
In .NET 10, EventFilter was added for EventPipe sessions to filter which eventIDs to disable or enable.
In .NET 11, EventPipe introduces a new buffering mode for loss-less event collection, as opposed to the typical lossy mode which drops events when buffers are full.
Also removes the preview banner/wording for dotnet-trace collect-linux


Internal previews

File Preview link
docs/core/diagnostics/dotnet-gcdump.md Preview published page
docs/core/diagnostics/dotnet-trace.md Preview published page
docs/core/diagnostics/eventpipe.md Preview published page
docs/core/diagnostics/microsoft-diagnostics-netcore-client.md Preview published page

mdh1418 and others added 7 commits July 2, 2026 19:42
Add Microsoft.Diagnostics.NETCore.Client reference for EventPipeBufferingMode, EventPipeProviderEventFilter, the new EventPipeSessionConfiguration and EventPipeProvider overloads and properties, and the UnknownCommandException and InvalidCommandArgumentException types.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dotnet-gcdump collect/report default to non-lossy (Block) with automatic fallback on older runtimes; dotnet-trace collect adds an opt-in --buffering-mode (default Drop). Block requires a .NET 11+ target runtime.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add DOTNET_EventPipeBufferingMode and DOTNET_EventPipeOutputStreaming to the EventPipe environment-variable reference, and note the non-lossy opt-in on the circular-buffer guidance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the --buffering-mode option from dotnet-gcdump (it now always collects non-lossy and falls back to lossy on pre-.NET 11 targets). Replace the dropped UnknownCommandException and InvalidCommandArgumentException with the new BadEncodingException and fix the UnsupportedCommandException base type. Clarify that non-lossy buffering is bounded by buffer capacity and can still drop events under host memory exhaustion or during shutdown, and correct the DOTNET_EventPipeBufferingMode invalid-value and streaming-session behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
@mdh1418
mdh1418 requested review from hoyosjs and noahfalk and a lite review from Copilot August 21, 2026 16:02
@dotnetrepoman dotnetrepoman Bot added this to the August 2026 milestone Aug 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates .NET diagnostics documentation to reflect newer EventPipe capabilities (provider event ID filtering and non-lossy buffering) and aligns dotnet-trace/dotnet-gcdump guidance with the newer runtime behavior.

Changes:

  • Document EventPipeBufferingMode and EventPipeProviderEventFilter in the Microsoft.Diagnostics.NETCore.Client API reference.
  • Add DOTNET_EventPipeBufferingMode guidance and describe non-lossy buffering behavior for streaming sessions.
  • Add dotnet-trace collect --buffering-mode and remove the preview banner text for dotnet-trace collect-linux, plus clarify dotnet-gcdump buffering behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
docs/core/diagnostics/microsoft-diagnostics-netcore-client.md Adds API surface documentation for buffering mode and per-provider event ID filtering.
docs/core/diagnostics/eventpipe.md Documents non-lossy buffering via DOTNET_EventPipeBufferingMode for startup/streaming sessions.
docs/core/diagnostics/dotnet-trace.md Adds --buffering-mode option and removes collect-linux preview banner wording.
docs/core/diagnostics/dotnet-gcdump.md Notes non-lossy buffering behavior and updates troubleshooting guidance accordingly.
Suppressed comments (1)

docs/core/diagnostics/microsoft-diagnostics-netcore-client.md:433

  • The "Constructor" signature block for EventPipeProvider is missing the terminating ); for both overloads, so the snippet isn’t valid C# syntax.
    string name,
    EventLevel eventLevel,
    long keywords,
    IDictionary<string, string> arguments,
    EventPipeProviderEventFilter eventFilter)

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/core/diagnostics/microsoft-diagnostics-netcore-client.md
Comment thread docs/core/diagnostics/dotnet-gcdump.md Outdated
Comment thread docs/core/diagnostics/dotnet-gcdump.md Outdated
Comment thread docs/core/diagnostics/dotnet-trace.md Outdated
Comment thread docs/core/diagnostics/dotnet-trace.md Outdated
Comment thread docs/core/diagnostics/dotnet-trace.md Outdated
Comment thread docs/core/diagnostics/eventpipe.md Outdated
Comment thread docs/core/diagnostics/eventpipe.md Outdated
Comment thread docs/core/diagnostics/eventpipe.md Outdated
Comment thread docs/core/diagnostics/microsoft-diagnostics-netcore-client.md Outdated
Comment thread docs/core/diagnostics/microsoft-diagnostics-netcore-client.md Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: a5765868-3160-4052-b7cd-86df02acb53b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants