ray.util.metrics.Gauge.set_default_tags#
- Gauge.set_default_tags(default_tags: Dict[str, str])#
Set default tags of metrics.
Example
>>> from ray.util.metrics import Counter >>> # Note that set_default_tags returns the instance itself. >>> counter = Counter("name", tag_keys=("a",)) >>> counter2 = counter.set_default_tags({"a": "b"}) >>> assert counter is counter2 >>> # this means you can instantiate it in this way. >>> counter = Counter("name", tag_keys=("a",)).set_default_tags({"a": "b"})
- Parameters:
default_tags – Default tags that are used for every record method.
- Returns:
it returns the instance itself.
- Return type:
Metric