yr.Gauge

Contents

yr.Gauge#

class yr.Gauge(name: str, description: str, unit: str = '', labels: Dict[str, str] = {})[source]#

Bases: Metrics

Used for reporting metrics data.

Note

  1. Prometheus-like data structure.

  2. Billing information is reported to the backend openYuanRong collector.

  3. Not usable within the driver.

Parameters:
  • name (str) – name.

  • description (str) – description.

  • unit (str, optional) – Unit.

  • labels (Dict[str, str], optional) – Label. e.g. labels = {"request_id": "abc"}.

Methods

__init__

add_labels

add label.

set

set value.