INNER CODE UNIT · Python
is_counter
DataDog/dd-agent · checks/__init__.py:123
def is_counter(self, metric):
"Is this metric a counter?"
return metric in self._counters
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)