Anaconda OpenTelemetry for Typescript
    Preparing search index...

    Function recordHistogram

    • Records a value in a histogram metric with optional attributes.

      Parameters

      • args: HistogramArgs

        An argument list object where the name field is required.

        The args is an object defined by (in any order):

        {
        name: string = ""; Required; Not supplying a name will result in no value being recorded.
        value: number = 0; Required; This field will be recorded as the value.
        attributes?: AttrMap = {}; Optional; Attributes for the value metric.
        }

      Returns boolean

      true if the histogram was recorded successfully, false if metrics are not initialized.

      recordHistogram({name: "validName", value: 42.0, attributes: { "name": "Value" }})