Loupe - Log - Monitor - Resolve
Gibraltar.Agent.Metrics Namespace / SampledMetricDefinition Class / Register(String,String,String,SamplingType,String,String,String) Method
The metrics capture system label.
The name of the category with which this definition is associated.
The name of the definition within the category.
The sampling type of the sampled metric counter.
A displayable caption for the units this metric's values represent, or null for unit-less values.
A displayable caption for this sampled metric counter.
An extended end-user description of this sampled metric counter.

In This Topic
    Register(String,String,String,SamplingType,String,String,String) Method
    In This Topic
    Find or create a sampled metric definition from the specified parameters.
    Syntax

    Parameters

    metricsSystem
    The metrics capture system label.
    categoryName
    The name of the category with which this definition is associated.
    counterName
    The name of the definition within the category.
    samplingType
    The sampling type of the sampled metric counter.
    unitCaption
    A displayable caption for the units this metric's values represent, or null for unit-less values.
    metricCaption
    A displayable caption for this sampled metric counter.
    description
    An extended end-user description of this sampled metric counter.
    Exceptions
    ExceptionDescription
    The provided metricsSystem, categoryName, or counterName was null.
    There is already a metric definition for the same key, but it is not a sampled metric.
    -or-
    There is already a sampled metric definition for the same key but it uses an incompatible sampling type.
    Remarks
    If a metric definition does not already exist for the specified metrics system, category name, and counter name, a new sampled metric definition will be created from the provided parameters. If one already exists then it will be checked for compatibility. A sampled metric defined with the same SamplingType will be considered compatible, otherwise an ArgumentException will be thrown. Each distinct metric definition (all sampled metrics and event metrics) must have a distinct Key (the metrics system, category, and counter name). Multiple metric instances can then be created (each with its own instance name) from the same metric definition.
    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