Loupe - Log - Monitor - Resolve
Gibraltar.Monitor Namespace / CustomSampledMetric Class / WriteSample Method / WriteSample(Double,DateTimeOffset) Method
The raw data value
The exact date and time the raw value was determined

In This Topic
    WriteSample(Double,DateTimeOffset) Method
    In This Topic
    Write a metric sample with the provided data immediately.
    Syntax
    'Declaration
     
    
    Public Overloads Sub WriteSample( _
       ByVal rawValue As Double, _
       ByVal rawTimeStamp As DateTimeOffset _
    ) 
    public void WriteSample( 
       double rawValue,
       DateTimeOffset rawTimeStamp
    )

    Parameters

    rawValue
    The raw data value
    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.

    Custom metrics using a sample type of AverageFraction and DeltaFraction should not use this method because they require a base value as well as a raw value.

    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