Chat Support
Loupe - Log - Monitor - Resolve
Gibraltar.Monitor Namespace / CustomSampledMetricDefinition Class / WriteSample Method / WriteSample(String,Double,Double,DateTimeOffset) Method
The instance name to use, or blank or null for the default metric.
The raw data value
The reference value to compare against for come counter types
The exact date and time the raw value was determined

In This Topic
    WriteSample(String,Double,Double,DateTimeOffset) Method
    In This Topic
    Write a metric sample to the specified metric instance with the provided data immediately, creating the metric if it doesn't exist.
    Syntax
    'Declaration
     
    
    Public Overloads Sub WriteSample( _
       ByVal instanceName As String, _
       ByVal rawValue As Double, _
       ByVal baseValue As Double, _
       ByVal rawTimeStamp As DateTimeOffset _
    ) 

    Parameters

    instanceName
    The instance name to use, or blank or null for the default metric.
    rawValue
    The raw data value
    baseValue
    The reference value to compare against for come counter types
    rawTimeStamp
    The exact date and time the raw value was determined
    Remarks
    The sample is immediately written to the log. If you are sampling multiple metrics at the same time, it is faster to create each of the samples and write them with one call to Log.Write instead of writing them out individually. To do this, you can use CreateMetricSample
    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