-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Open
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-System.Diagnostics.TracinguntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
Description
Background and motivation
This is the last missing piece to implement an EventSource Source Generator, more context: #121180 (comment)
tl;dr:
Today, when developers need to set EtwSelfDescribingEventFormat mode (we have 3 EventSource implementations doing so) they cannot declare it in the [EventSource] attribute and have to do that via the base EventSource constructor.
Unblocks #121180
API Proposal
namespace System.Diagnostics.Tracing;
[System.AttributeUsageAttribute(System.AttributeTargets.Class)]
public sealed partial class EventSourceAttribute : System.Attribute
{
public EventSourceAttribute() { }
public string? Guid { get; set; }
public string? LocalizationResources { get; set; }
public string? Name { get; set; }
+ public EventSourceSettings? Settings { get; set; }
}API Usage
[EventSource(
Name = DiagnosticSourceEventSourceName,
Settings = EventSourceSettings.EtwSelfDescribingEventFormat)]
internal sealed class DiagnosticSourceEventSource : EventSourceAlternative Designs
Risks
Metadata
Metadata
Assignees
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-System.Diagnostics.TracinguntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner