mscorlib(4.0.0.0) API with additions
System.Diagnostics.Tracing Namespace Reference

Classes

class  EventAttribute
 Specifies additional event schema information for an event. More...
 
class  EventCommandEventArgs
 Provides the arguments for the M:System.Diagnostics.Tracing.EventSource.OnEventCommand(System.Diagnostics.Tracing.EventCommandEventArgs) callback. More...
 
class  EventDataAttribute
 Specifies a type to be passed to the M:System.Diagnostics.Tracing.EventSource.Write``1(System.String,System.Diagnostics.Tracing.EventSourceOptions,``0) method. More...
 
class  EventFieldAttribute
 The T:System.Diagnostics.Tracing.EventFieldAttribute is placed on fields of user-defined types that are passed as T:System.Diagnostics.Tracing.EventSource payloads. More...
 
class  EventIgnoreAttribute
 Specifies a property should be ignored when writing an event type with the M:System.Diagnostics.Tracing.EventSource.Write``1(System.String,System.Diagnostics.Tracing.EventSourceOptions@,``0@) method. More...
 
class  EventListener
 Provides methods for enabling and disabling events from event sources. More...
 
class  EventSource
 Provides the ability to create events for event tracing for Windows (ETW). More...
 
class  EventSourceAttribute
 Allows the event tracing for Windows (ETW) name to be defined independently of the name of the event source class. More...
 
class  EventSourceCreatedEventArgs
 Provides data for the E:System.Diagnostics.Tracing.EventListener.EventSourceCreated event. More...
 
class  EventSourceException
 The exception that is thrown when an error occurs during event tracing for Windows (ETW). More...
 
struct  EventSourceOptions
 Specifies overrides of default event settings such as the log level, keywords and operation code when the M:System.Diagnostics.Tracing.EventSource.Write``1(System.String,System.Diagnostics.Tracing.EventSourceOptions,``0) method is called. More...
 
class  EventWrittenEventArgs
 Provides data for the M:System.Diagnostics.Tracing.EventListener.OnEventWritten(System.Diagnostics.Tracing.EventWrittenEventArgs) callback. More...
 
class  NonEventAttribute
 Identifies a method that is not generating an event. More...
 

Enumerations

enum  ControllerCommand { Update = 0, SendManifest = -1, Enable = -2, Disable = -3 }
 
enum  EventActivityOptions { EventActivityOptions.None = 0x0, EventActivityOptions.Disable = 0x2, EventActivityOptions.Recursive = 0x4, EventActivityOptions.Detachable = 0x8 }
 Specifies the tracking of activity start and stop events. More...
 
enum  EventChannel : byte {
  EventChannel.None = 0, EventChannel.Admin = 0x10, EventChannel.Operational = 17, EventChannel.Analytic = 18,
  EventChannel.Debug = 19
}
 Specifies the event log channel for the event. More...
 
enum  EventChannelType { Admin = 1, Operational, Analytic, Debug }
 
enum  EventCommand { EventCommand.Update = 0, EventCommand.SendManifest = -1, EventCommand.Enable = -2, EventCommand.Disable = -3 }
 Describes the command (P:System.Diagnostics.Tracing.EventCommandEventArgs.Command property) that is passed to the M:System.Diagnostics.Tracing.EventSource.OnEventCommand(System.Diagnostics.Tracing.EventCommandEventArgs) callback. More...
 
enum  EventFieldFormat {
  EventFieldFormat.Default = 0, EventFieldFormat.String = 2, EventFieldFormat.Boolean = 3, EventFieldFormat.Hexadecimal = 4,
  EventFieldFormat.Xml = 11, EventFieldFormat.Json = 12, EventFieldFormat.HResult = 0xF
}
 Specifies how to format the value of a user-defined type and can be used to override the default formatting for a field. More...
 
enum  EventFieldTags { EventFieldTags.None = 0x0 }
 Specifies the user-defined tag that is placed on fields of user-defined types that are passed as T:System.Diagnostics.Tracing.EventSource payloads through the T:System.Diagnostics.Tracing.EventFieldAttribute. More...
 
enum  EventKeywords : long {
  EventKeywords.None = 0x0, EventKeywords.All = -1L, EventKeywords.MicrosoftTelemetry = 0x2000000000000, EventKeywords.WdiContext = 0x2000000000000,
  EventKeywords.WdiDiagnostic = 0x4000000000000, EventKeywords.Sqm = 0x8000000000000, EventKeywords.AuditFailure = 0x10000000000000, EventKeywords.AuditSuccess = 0x20000000000000,
  EventKeywords.CorrelationHint = 0x10000000000000, EventKeywords.EventLogClassic = 0x80000000000000
}
 Defines the standard keywords that apply to events. More...
 
enum  EventLevel {
  EventLevel.LogAlways, EventLevel.Critical, EventLevel.Error, EventLevel.Warning,
  EventLevel.Informational, EventLevel.Verbose
}
 Identifies the level of an event. More...
 
enum  EventManifestOptions {
  EventManifestOptions.None = 0x0, EventManifestOptions.Strict = 0x1, EventManifestOptions.AllCultures = 0x2, EventManifestOptions.OnlyIfNeededForRegistration = 0x4,
  EventManifestOptions.AllowEventSourceOverride = 0x8
}
 Specifies how the ETW manifest for the event source is generated. More...
 
enum  EventOpcode {
  EventOpcode.Info = 0, EventOpcode.Start = 1, EventOpcode.Stop = 2, EventOpcode.DataCollectionStart = 3,
  EventOpcode.DataCollectionStop = 4, EventOpcode.Extension = 5, EventOpcode.Reply = 6, EventOpcode.Resume = 7,
  EventOpcode.Suspend = 8, EventOpcode.Send = 9, EventOpcode.Receive = 240
}
 Defines the standard operation codes that the event source attaches to events. More...
 
enum  EventSourceSettings { EventSourceSettings.Default = 0x0, EventSourceSettings.ThrowOnEventWriteErrors = 0x1, EventSourceSettings.EtwManifestEventFormat = 0x4, EventSourceSettings.EtwSelfDescribingEventFormat = 0x8 }
 Specifies configuration options for an event source. More...
 
enum  EventTags { EventTags.None = 0x0 }
 Specifies the tracking of activity start and stop events. You should only use the lower 24 bits. For more information, see T:System.Diagnostics.Tracing.EventSourceOptions and M:System.Diagnostics.Tracing.EventSource.Write(System.String,System.Diagnostics.Tracing.EventSourceOptions). More...
 
enum  EventTask { EventTask.None }
 Defines the tasks that apply to events. More...
 
enum  TraceLoggingDataType {
  Nil = 0, Utf16String = 1, MbcsString = 2, Int8 = 3,
  UInt8 = 4, Int16 = 5, UInt16 = 6, Int32 = 7,
  UInt32 = 8, Int64 = 9, UInt64 = 10, Float = 11,
  Double = 12, Boolean32 = 13, Binary = 14, Guid = 0xF,
  FileTime = 17, SystemTime = 18, HexInt32 = 20, HexInt64 = 21,
  CountedUtf16String = 22, CountedMbcsString = 23, Struct = 24, Char16 = 518,
  Char8 = 516, Boolean8 = 772, HexInt8 = 1028, HexInt16 = 1030,
  Utf16Xml = 2817, MbcsXml = 2818, CountedUtf16Xml = 2838, CountedMbcsXml = 2839,
  Utf16Json = 3073, MbcsJson = 3074, CountedUtf16Json = 3094, CountedMbcsJson = 3095,
  HResult = 3847
}
 

Enumeration Type Documentation

◆ EventActivityOptions

Specifies the tracking of activity start and stop events.

Enumerator
None 

Use the default behavior for start and stop tracking.

Disable 

Turn off start and stop tracking.

Recursive 

Allow recursive activity starts. By default, an activity cannot be recursive. That is, a sequence of Start A, Start A, Stop A, Stop A is not allowed. Unintentional recursive activities can occur if the app executes and for some the stop is not reached before another start is called.

Detachable 

Allow overlapping activities. By default, activity starts and stops must be property nested. That is, a sequence of Start A, Start B, Stop A, Stop B is not allowed will result in B stopping at the same time as A.

Definition at line 6 of file EventActivityOptions.cs.

◆ EventChannel

Specifies the event log channel for the event.

Enumerator
None 

No channel specified.

Admin 

The administrator log channel.

Operational 

The operational channel.

Analytic 

The analytic channel.

Debug 

The debug channel.

Definition at line 8 of file EventChannel.cs.

◆ EventCommand

Describes the command (P:System.Diagnostics.Tracing.EventCommandEventArgs.Command property) that is passed to the M:System.Diagnostics.Tracing.EventSource.OnEventCommand(System.Diagnostics.Tracing.EventCommandEventArgs) callback.

Enumerator
Update 

Update the event.

SendManifest 

Send the manifest.

Enable 

Enable the event.

Disable 

Disable the event.

Definition at line 5 of file EventCommand.cs.

◆ EventFieldFormat

Specifies how to format the value of a user-defined type and can be used to override the default formatting for a field.

Enumerator
Default 

Default.

String 

String.

Boolean 

Boolean

Hexadecimal 

Hexadecimal.

Xml 

XML.

Json 

JSON.

HResult 

HResult.

Definition at line 5 of file EventFieldFormat.cs.

◆ EventFieldTags

Specifies the user-defined tag that is placed on fields of user-defined types that are passed as T:System.Diagnostics.Tracing.EventSource payloads through the T:System.Diagnostics.Tracing.EventFieldAttribute.

Enumerator
None 

Specifies no tag and is equal to zero.

Definition at line 6 of file EventFieldTags.cs.

◆ EventKeywords

Defines the standard keywords that apply to events.

Enumerator
None 

No filtering on keywords is performed when the event is published.

All 

All the bits are set to 1, representing every possible group of events.

MicrosoftTelemetry 

Attached to all Microsoft telemetry events.

WdiContext 

Attached to all Windows Diagnostics Infrastructure (WDI) context events.

WdiDiagnostic 

Attached to all Windows Diagnostics Infrastructure (WDI) diagnostic events.

Sqm 

Attached to all Service Quality Mechanism (SQM) events.

AuditFailure 

Attached to all failed security audit events. Use this keyword only for events in the security log.

AuditSuccess 

Attached to all successful security audit events. Use this keyword only for events in the security log.

CorrelationHint 

Attached to transfer events where the related activity ID (correlation ID) is a computed value and is not guaranteed to be unique (that is, it is not a real GUID).

EventLogClassic 

Attached to events that are raised by using the RaiseEvent function.

Definition at line 6 of file EventKeywords.cs.

◆ EventLevel

Identifies the level of an event.

Enumerator
LogAlways 

No level filtering is done on the event.

Critical 

This level corresponds to a critical error, which is a serious error that has caused a major failure.

Error 

This level adds standard errors that signify a problem.

Warning 

This level adds warning events (for example, events that are published because a disk is nearing full capacity).

Informational 

This level adds informational events or messages that are not errors. These events can help trace the progress or state of an application.

Verbose 

This level adds lengthy events or messages. It causes all events to be logged.

Definition at line 5 of file EventLevel.cs.

◆ EventManifestOptions

Specifies how the ETW manifest for the event source is generated.

Enumerator
None 

No options are specified.

Strict 

Causes an exception to be raised if any inconsistencies occur when writing the manifest file.

AllCultures 

Generates a resources node under the localization folder for every satellite assembly provided.

OnlyIfNeededForRegistration 

A manifest is generated only the event source must be registered on the host computer.

AllowEventSourceOverride 

Overrides the default behavior that the current T:System.Diagnostics.Tracing.EventSource must be the base class of the user-defined type passed to the write method. This enables the validation of .NET event sources.

Definition at line 6 of file EventManifestOptions.cs.

◆ EventOpcode

Defines the standard operation codes that the event source attaches to events.

Enumerator
Info 

An informational event.

Start 

An event that is published when an application starts a new transaction or activity. This operation code can be embedded within another transaction or activity when multiple events that have the F:System.Diagnostics.Tracing.EventOpcode.Start code follow each other without an intervening event that has a F:System.Diagnostics.Tracing.EventOpcode.Stop code.

Stop 

An event that is published when an activity or a transaction in an application ends. The event corresponds to the last unpaired event that has a F:System.Diagnostics.Tracing.EventOpcode.Start operation code.

DataCollectionStart 

A trace collection start event.

DataCollectionStop 

A trace collection stop event.

Extension 

An extension event.

Reply 

An event that is published after an activity in an application replies to an event.

Resume 

An event that is published after an activity in an application resumes from a suspended state. The event should follow an event that has the F:System.Diagnostics.Tracing.EventOpcode.Suspend operation code.

Suspend 

An event that is published when an activity in an application is suspended.

Send 

An event that is published when one activity in an application transfers data or system resources to another activity.

Receive 

An event that is published when one activity in an application receives data.

Definition at line 8 of file EventOpcode.cs.

◆ EventSourceSettings

Specifies configuration options for an event source.

Enumerator
Default 

None of the special configuration options are enabled.

ThrowOnEventWriteErrors 

The event source throws an exception when an error occurs.

EtwManifestEventFormat 

The ETW listener should use a manifest-based format when raising events. Setting this option is a directive to the ETW listener should use manifest-based format when raising events. This is the default option when defining a type derived from T:System.Diagnostics.Tracing.EventSource using one of the protected T:System.Diagnostics.Tracing.EventSource constructors.

EtwSelfDescribingEventFormat 

The ETW listener should use self-describing event format. This is the default option when creating a new instance of the T:System.Diagnostics.Tracing.EventSource using one of the public T:System.Diagnostics.Tracing.EventSource constructors.

Definition at line 6 of file EventSourceSettings.cs.

◆ EventTags

Specifies the tracking of activity start and stop events. You should only use the lower 24 bits. For more information, see T:System.Diagnostics.Tracing.EventSourceOptions and M:System.Diagnostics.Tracing.EventSource.Write(System.String,System.Diagnostics.Tracing.EventSourceOptions).

Enumerator
None 

Specifies no tag and is equal to zero.

Definition at line 6 of file EventTags.cs.

◆ EventTask

Defines the tasks that apply to events.

Enumerator
None 

Undefined task.

Definition at line 8 of file EventTask.cs.