System.Diagnostics.Tracing 命名空间

System.Diagnostics.Tracing 命名空间提供使您能够生成强类型的事件的类型和成员,这些事件利用 Windows (ETW) 事件追踪进行事件捕捉。 The System.Diagnostics.Tracing namespace provides types and members that enable you to create strongly typed events to be captured by event tracing for Windows (ETW).

DiagnosticCounter

DiagnosticCounter 是一个抽象类,用作各种计数器* 类(即 EventCounterPollingCounterIncrementingEventCounterIncrementingPollingCounter)的父类。DiagnosticCounter is an abstract class that serves as the parent class for various Counter* classes, namely EventCounter, PollingCounter, IncrementingEventCounter, and IncrementingPollingCounter.

EventAttribute

指定事件的附加事件架构信息。Specifies additional event schema information for an event.

EventCommandEventArgs

提供 OnEventCommand(EventCommandEventArgs) 回调的参数。Provides the arguments for the OnEventCommand(EventCommandEventArgs) callback.

EventCounter

能够通过 EventSource 类收集非常频繁的事件的统计信息。Provides the ability to collect statistics for very frequent events through the EventSource class.

EventDataAttribute

指定要传递给 Write<T>(String, EventSourceOptions, T) 方法的类型。Specifies a type to be passed to the Write<T>(String, EventSourceOptions, T) method.

EventFieldAttribute

EventFieldAttribute 位于作为 EventSource 有效负载传递的用户定义类型的字段中。The EventFieldAttribute is placed on fields of user-defined types that are passed as EventSource payloads.

EventIgnoreAttribute

指定在使用 Write<T>(String, EventSourceOptions, T) 方法写入事件类型时应忽略属性。Specifies a property should be ignored when writing an event type with the Write<T>(String, EventSourceOptions, T) method.

EventListener

提供用于启用和禁用事件源中事件的方法。Provides methods for enabling and disabling events from event sources.

EventSource

提供为 Windows 事件跟踪 (ETW) 创建事件的功能。Provides the ability to create events for event tracing for Windows (ETW).

EventSourceAttribute

允许事件跟踪独立于事件源类的名称定义的 Windows (ETW) 名称。Allows the event tracing for Windows (ETW) name to be defined independently of the name of the event source class.

EventSourceCreatedEventArgs

EventSourceCreated 事件提供数据。Provides data for the EventSourceCreated event.

EventSourceException

在 Windows (ETW) 中追踪事件时发生错误时引发的异常。The exception that is thrown when an error occurs during event tracing for Windows (ETW).

EventWrittenEventArgs

OnEventWritten(EventWrittenEventArgs) 回调提供数据。Provides data for the OnEventWritten(EventWrittenEventArgs) callback.

IncrementingEventCounter

为不断增大的变量提供 EventCounter 的变体,例如运行时中的异常数。Provides a variant of EventCounter for variables that are ever-increasing, such as the number of exceptions in the runtime.

IncrementingPollingCounter

为不断增大的变量提供 EventCounter 的变体,例如运行时中的异常数。Provides a variant of EventCounter for variables that are ever-increasing, such as the number of exceptions in the runtime.

NonEventAttribute

是被不会形成事件的方法。Identifies a method that is not generating an event.

PollingCounter

提供 EventCounter 的一个变体,用于收集类似的统计信息并将其计算为EventCounterProvides a variant of EventCounter that collects and calculates similar statistics as EventCounter.

结构

EventSource.EventData

提供事件数据用于创建快速 WriteEvent 过载,方法是使用 WriteEventCore(Int32, Int32, EventSource+EventData*) 方法。Provides the event data for creating fast WriteEvent overloads by using the WriteEventCore(Int32, Int32, EventSource+EventData*) method.

EventSourceOptions

指定在调用 Write<T>(String, EventSourceOptions, T) 方法时重写默认事件设置(如日志级别、关键字和操作代码)。Specifies overrides of default event settings such as the log level, keywords and operation code when the Write<T>(String, EventSourceOptions, T) method is called.

枚举

EventActivityOptions

指定活动开始和停止事件的跟踪。Specifies the tracking of activity start and stop events.

EventChannel

指定事件的事件日志通道。Specifies the event log channel for the event.

EventCommand

描述传递给 Command 恢复命令 (OnEventCommand(EventCommandEventArgs) 属性。Describes the command (Command property) that is passed to the OnEventCommand(EventCommandEventArgs) callback.

EventFieldFormat

指定如何设置用户定义类型的值的格式并可用于覆盖字段的默认格式。Specifies how to format the value of a user-defined type and can be used to override the default formatting for a field.

EventFieldTags

指定位于作为 EventSource 有效负载传递到 EventFieldAttribute 的用户定义类型的字段中的用户定义标记。Specifies the user-defined tag that is placed on fields of user-defined types that are passed as EventSource payloads through the EventFieldAttribute.

EventKeywords

定义应用于事件的标准关键字。Defines the standard keywords that apply to events.

EventLevel

标识事件的级别。Identifies the level of an event.

EventManifestOptions

指定如何生成事件源的 ETW 清单。Specifies how the ETW manifest for the event source is generated.

EventOpcode

定义标准操作代码,事件源将其添加到事件。Defines the standard operation codes that the event source attaches to events.

EventSourceSettings

指定事件源的配置选项。Specifies configuration options for an event source.

EventTags

指定活动开始和停止事件的跟踪。Specifies the tracking of activity start and stop events. 只应使用较低的 24 位。You should only use the lower 24 bits. 有关详细信息,请参阅 EventSourceOptionsWrite(String, EventSourceOptions)For more information, see EventSourceOptions and Write(String, EventSourceOptions).

EventTask

定义应用于事件中任务。Defines the tasks that apply to events.

注解

强类型化的事件由名称标识,并说明有效负载。A strongly typed event is identified by name and contains payload descriptions. 可以发现一个程序可以通过使用反射来生成的事件的列表。You can discover the list of events that a program can produce by using reflection.