Skip to content

Define and implement behavior of tracing functionality when EventSource is disabled via a feature switch #43657

@vitek-karas

Description

@vitek-karas

In .NET 5 we introduced a new feature switch EventSourceSupport - it effectively disables all event sources (typical observed behavior is that they can't be enabled and thus don't produce any events). For the most part this has been implemented for Mono/WASM scenarios which don't support event source anyway, so the code was effectively unused.

If used on CoreCLR, there's still quite a bit of code left in the app (which linker can't remove right now) related to EventPipe - currently all of this code is rooted. It's easy to remove it via the EventSourceSupport feature switch, but it's unclear what that will do to the EventPipe infrastructure.

Specifically:

  • We need to make sure this doesn't cause failures in the application itself
  • We need to determine the desired behavior of all in-proc tracing scenarios (this probably already works to a point - as in in-proc listeners will work, but won't receive any events).
  • We need to determine the desired behavior of all out-of-proc tracing scenarios - specifically dotnet trace collect and similar.

This issue is meant to track both the design an implementation of these changes.

Metadata

Metadata

Assignees

Labels

area-System.Diagnostics.TracingenhancementProduct code improvement that does NOT require public API changes/additionslinkable-frameworkIssues associated with delivering a linker friendly framework

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions