Class TestMetricMeasurement

Namespace
XBullet.EasyTesting.Observability
Assembly
XBullet.EasyTesting.Observability.dll

One metric measurement captured from an integration-test process.

public sealed class TestMetricMeasurement
Inheritance
TestMetricMeasurement
Inherited Members

Constructors

TestMetricMeasurement(DateTimeOffset, string, string, string, string?, string?, object, IReadOnlyDictionary<string, object?>)

Creates an immutable captured metric measurement.

public TestMetricMeasurement(DateTimeOffset timestamp, string meterName, string instrumentName, string instrumentType, string? unit, string? description, object value, IReadOnlyDictionary<string, object?> tags)

Parameters

timestamp DateTimeOffset

The absolute capture instant supplied by the collector's clock.

meterName string

The publishing meter name.

instrumentName string

The instrument name.

instrumentType string

The runtime instrument type name.

unit string

The instrument-defined unit text, or null when no unit was declared. No unit conversion is performed.

description string

The instrument description, or null when absent.

value object

The non-null boxed measurement value, retained without numeric conversion.

tags IReadOnlyDictionary<string, object>

The measurement tags. The dictionary is retained without copying and can contain sensitive or mutable values; callers should not mutate it after construction.

Properties

Description

Gets the instrument description.

public string? Description { get; }

Property Value

string

The description supplied by the instrument, or null when absent.

InstrumentName

Gets the instrument name.

public string InstrumentName { get; }

Property Value

string

The exact instrument name.

InstrumentType

Gets the runtime instrument type name.

public string InstrumentType { get; }

Property Value

string

The simple runtime type name, such as a counter or histogram implementation.

MeterName

Gets the meter name.

public string MeterName { get; }

Property Value

string

The exact publishing meter name.

Tags

Gets a stable copy of the measurement tags.

public IReadOnlyDictionary<string, object?> Tags { get; }

Property Value

IReadOnlyDictionary<string, object>

The retained read-only tags. Values are not deep-cloned or redacted.

Timestamp

Gets the time at which the measurement was observed.

public DateTimeOffset Timestamp { get; }

Property Value

DateTimeOffset

The absolute instant returned by the collector's time provider.

Unit

Gets the instrument unit.

public string? Unit { get; }

Property Value

string

The instrument-defined unit text, or null when none was declared. The value is metadata only; measurements are not converted.

Value

Gets the boxed numeric measurement value.

public object Value { get; }

Property Value

object

The original boxed numeric value without conversion. Collector-produced values are byte, short, integer, long, float, double, or decimal measurements.