Setu-TS
    Preparing search index...

    Interface ICounter

    Monotonically increasing counter. observe / inc add a non-negative value.

    0.2.0

    interface ICounter {
        help: string;
        name: string;
        type: MetricType;
        inc(value?: number, labels?: Readonly<Record<string, string>>): void;
        observe(value?: number, labels?: Readonly<Record<string, string>>): void;
    }

    Hierarchy (View Summary)

    Index
    help: string

    Human-readable description.

    name: string

    Metric name (Prometheus naming conventions).

    The metric instrument kind.

    • Increments the counter.

      Parameters

      • Optionalvalue: number

        The value to add (default 1)

      • Optionallabels: Readonly<Record<string, string>>

        Label values keyed by label name

      Returns void

    • Records an observation.

      For counters the value is the increment (default 1); for gauges the new value; for histograms and summaries the observed sample.

      Parameters

      • Optionalvalue: number

        The observed value

      • Optionallabels: Readonly<Record<string, string>>

        Label values keyed by label name

      Returns void