Skip to content

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

Merged
BillWagner merged 11 commits into
dotnet:mainfrom
mdh1418:eventpipe-non-lossy-buffering-docs
Oct 19, 2026
Merged

BillWagner merged 11 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 Learn preview
docs/core/diagnostics/dotnet-trace.md Learn preview
docs/core/diagnostics/eventpipe.md Learn preview
docs/core/diagnostics/microsoft-diagnostics-netcore-client.md Learn preview

Build report

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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Co-authored-by: Genevieve Warren <[email protected]>
@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/dotnet-gcdump.md Resolved
Comment thread docs/core/diagnostics/dotnet-gcdump.md Resolved
Comment thread docs/core/diagnostics/dotnet-trace.md Resolved
Comment thread docs/core/diagnostics/dotnet-trace.md Resolved
Comment thread docs/core/diagnostics/dotnet-trace.md Resolved
Comment thread docs/core/diagnostics/eventpipe.md Resolved
Comment thread docs/core/diagnostics/eventpipe.md Resolved
Comment thread docs/core/diagnostics/eventpipe.md Resolved
Co-authored-by: Copilot <[email protected]>

Copilot-Session: a5765868-3160-4052-b7cd-86df02acb53b
@BillWagner BillWagner modified the milestones: August 2026, September 2026 Sep 4, 2026
@mdh1418
mdh1418 requested a review from lateralusX September 9, 2026 19:07
@mdh1418
mdh1418 marked this pull request as ready for review October 13, 2026 19:58
@mdh1418
mdh1418 requested review from a team and tommcdon as code owners October 13, 2026 19:59
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: dc30df3c-40b5-4458-bc84-fa38be1abff6

@tommcdon tommcdon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm!

Comment thread docs/core/diagnostics/dotnet-gcdump.md Resolved
Comment thread docs/core/diagnostics/dotnet-trace.md Resolved
Comment thread docs/core/diagnostics/eventpipe.md Resolved
Comment thread docs/core/diagnostics/dotnet-gcdump.md Resolved
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: dc30df3c-40b5-4458-bc84-fa38be1abff6
@BillWagner
BillWagner merged commit f8dc4a4 into dotnet:main Oct 19, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants