Skip to content

Compono.Metrics.MeterFactoryTestingExtensions.Verify

Compono.Metrics

Compono.Metrics.MeterFactoryTestingExtensions

MeterFactoryTestingExtensions.Verify Method

Overloads
Verify<T>(this IMeterFactory, string) The entry point for fluent verification, for example meters.Verify<long>("shop.orders.placed").WithTag("region", "eu").Once(). The selection is resolved here, when the builder is created, so a meter ambiguity, type conflict, or type mismatch throws before any filter is added.
Verify<T>(this IMeterFactory, string, string) The entry point for fluent verification scoped to one meter name. The selection is resolved here, when the builder is created.

MeterFactoryTestingExtensions.Verify\<T>(this IMeterFactory, string) Method

The entry point for fluent verification, for example meters.Verify<long>("shop.orders.placed").WithTag("region", "eu").Once(). The selection is resolved here, when the builder is created, so a meter ambiguity, type conflict, or type mismatch throws before any filter is added.

public static Compono.Metrics.MeasurementVerificationBuilder<T> Verify<T>(this System.Diagnostics.Metrics.IMeterFactory factory, string instrumentName)
    where T : struct;

Type parameters

T

The measurement value type - one of the seven supported types.

Parameters

factory System.Diagnostics.Metrics.IMeterFactory

The capturing factory.

instrumentName System.String

The instrument name to match (ordinal, case-sensitive).

Returns

Compono.Metrics.MeasurementVerificationBuilder<T>

Exceptions

System.InvalidOperationException
factory is not a CapturingMeterFactory; the name matches instruments in more than one meter; the name matches instruments that record more than one value type; or the matching instruments record a type other than T.

System.ArgumentException
instrumentName is null or empty; or T is not one of the seven supported measurement value types.

MeterFactoryTestingExtensions.Verify\<T>(this IMeterFactory, string, string) Method

The entry point for fluent verification scoped to one meter name. The selection is resolved here, when the builder is created.

public static Compono.Metrics.MeasurementVerificationBuilder<T> Verify<T>(this System.Diagnostics.Metrics.IMeterFactory factory, string meterName, string instrumentName)
    where T : struct;

Type parameters

T

The measurement value type - one of the seven supported types.

Parameters

factory System.Diagnostics.Metrics.IMeterFactory

The capturing factory.

meterName System.String

The meter name to match (ordinal, case-sensitive).

instrumentName System.String

The instrument name to match (ordinal, case-sensitive).

Returns

Compono.Metrics.MeasurementVerificationBuilder<T>

Exceptions

System.InvalidOperationException
factory is not a CapturingMeterFactory; the name matches instruments that record more than one value type; or the matching instruments record a type other than T.

System.ArgumentException
meterName or instrumentName is null or empty; or T is not one of the seven supported measurement value types.