'Declaration
Public NotInheritable Class EventMetricDefinition
public sealed class EventMetricDefinition
'Declaration
Public NotInheritable Class EventMetricDefinition
public sealed class EventMetricDefinition
Unlike sampled metrics which represent continuous values by sampling at periodic intervals, event metrics have meaning only at discrete moments in time when some "event" happens and records a sample to describe it.
Event metrics can define multiple values to be collected with each sample and can include both numeric data types (recorded as their native type) and strings (all non-numeric types are converted to strings). Numeric data columns can then be processed later to be graphed like Sampled Metrics. Both numeric and string data can be analyzed in a variety of ways to produce charts. This makes event metrics a powerful instrument for analyzing your application's behavior.
For more information Event Metrics, see Developer's Reference - Metrics - Designing Event Metrics.
Defining Event Metrics
Event metrics can be defined either programmatically or declaratively with attributes.
To define an event metric with attributes, apply the EventMetric attribute to the source code for any class, struct, or interface, and apply the EventMetricValue attribute to desired members to define the value columns. This approach provides a simple and powerful way to design and collect event metrics for your application. See the EventMetric Class Overview for an example.
To define an event metric programmatically requires more coding, but allows you to optimize the performance of recording event metrics and works in environments where it isn't feasible to decorate a class with attributes. See the EventMetric Class Overview for an example.
System.Object
Gibraltar.Agent.Metrics.EventMetricDefinition
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
EventMetricDefinition Members
Gibraltar.Agent.Metrics Namespace
Metrics - Designing Event Metrics