Loupe - Log - Monitor - Resolve
Gibraltar.Agent.Metrics Namespace / EventMetricDefinition Class
Members

In This Topic
    EventMetricDefinition Class
    In This Topic
    The definition of an event metric, which must be registered before any specific event metric instance can be created or sampled.
    Object Model
    EventMetricDefinition ClassEventMetricValueDefinition Class
    Syntax
    'Declaration
     
    
    Public NotInheritable Class EventMetricDefinition 
    public sealed class EventMetricDefinition 
    Remarks

    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.

    Example
    See the EventMetric Class Overview for an example.
    Inheritance Hierarchy

    System.Object
       Gibraltar.Agent.Metrics.EventMetricDefinition

    Requirements

    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

    See Also

    Reference

    EventMetricDefinition Members
    Gibraltar.Agent.Metrics Namespace

    Developer's Reference

    Metrics - Designing Event Metrics

    Related Classes

    EventMetric Class