Anaconda OpenTelemetry for Typescript
    Preparing search index...

    Function recordGauge

    • Records an instantaneous value in a gauge metric with optional attributes.

      Parameters

      • args: GaugeArgs

        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 instantaneous value.
        attributes?: AttrMap = {}; Optional; Attributes for the gauge metric.
        }

      Returns boolean

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

      recordGauge({name: "cpu.usage", value: 72.5, attributes: { "host": "node-1" }})