Chat Support
Loupe - Log - Monitor - Resolve
Gibraltar.Agent.Metrics Namespace / EventMetricDefinition Class / AddValue Method
The unique name for this value column definition.
The simple type of this value (e.g. typeof(int) or typeof(string)).
The default way that individual samples of this value column can be aggregated to create a graphable summary. (Use SummaryFunction.Count for non-numeric types.)
A displayable caption for the units this value represents, or null for unit-less values.
The end-user display caption for this value column.
The end-user description for this value column.

AddValue Method (EventMetricDefinition)
Create a new value column definition with the supplied name and type. The name must be unique within this definition.
Syntax
'Declaration
 
Public Function AddValue( _
   ByVal name As String, _
   ByVal type As Type, _
   ByVal summaryFunction As SummaryFunction, _
   ByVal unitCaption As String, _
   ByVal caption As String, _
   ByVal description As String _
) As EventMetricValueDefinition
 

Parameters

name
The unique name for this value column definition.
type
The simple type of this value (e.g. typeof(int) or typeof(string)).
summaryFunction
The default way that individual samples of this value column can be aggregated to create a graphable summary. (Use SummaryFunction.Count for non-numeric types.)
unitCaption
A displayable caption for the units this value represents, or null for unit-less values.
caption
The end-user display caption for this value column.
description
The end-user description for this value column.

Return Value

The newly created value column definition.
Remarks
Internally, only simple types are supported. Any non-numeric, non-DateTimeOffset type will be converted to a string using the default ToString capability when it is recorded.
Example
See the EventMetric Class Overview for an example.
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