INNER CODE UNIT · Python
gauge
DataDog/dd-agent · checks/__init__.py:127
def gauge(self, metric):
"""
Treats the metric as a gauge, i.e. keep the data as is
ACHTUNG: Resets previous values associated with this metric.
"""
self._sample_store[metric] = {}
def is_metric(self, metric):
return metric in self._sample_store
def is_gauge(self, metric):
return self.is_metric(metric) and \
not self.is_counter(metric)
def get_metric_names(self):
"Get all metric names"
return self._sample_store.keys()