• A metric factory function.

    Parameters

    • type: string

      The type of the metric to create.

    • v: unknown

      The value with which to instantiate the metric.

    Returns Metric<JSONValue, JSONValue>

    A metric instance.

    Throws

    • In case type is not listed in the Context.supportedMetrics;
    • In case v is not in the correct representation for the wanted metric type.

Generated using TypeDoc